{"record":{"id":"c37a286283306712","repo":"oxc-project/oxc","slug":"virtualfree-failed-err","errorCode":null,"errorMessage":"`VirtualFree` failed: {err}","messagePattern":"`VirtualFree` failed: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/oxc_allocator/src/arena/fixed_size/windows.rs","lineNumber":452,"sourceCode":"pub unsafe fn dealloc_fixed_size_arena_chunk(footer_ptr: NonNull<ChunkFooter>) {\n    // Create `&ChunkFooter` reference in a block, to ensure it is not live when we deallocate the chunk's memory\n    // (which contains the `ChunkFooter`)\n    let (backing_alloc_ptr, layout, is_fixed_size) = {\n        // SAFETY: Caller guarantees that `footer_ptr` points to a valid `ChunkFooter`\n        let footer = unsafe { footer_ptr.as_ref() };\n        (footer.backing_alloc_ptr, footer.layout, footer.is_fixed_size)\n    };\n\n    debug_assert!(\n        is_fixed_size,\n        \"Only fixed-size allocators should be passed to `dealloc_fixed_size_arena_chunk` to deallocate\"\n    );\n\n    // SAFETY: Each `ChunkFooter`'s `backing_alloc_ptr` and `layout` describe its backing allocation.\n    // Caller guarantees chunk was created with `Arena::new_fixed_size`, so backing allocation was made\n    // via `Mmap::reserve` with `layout.size()` bytes.\n    unsafe { Mmap::free(backing_alloc_ptr, layout.size()) }.unwrap_or_else(|err| {\n        panic!(\"`VirtualFree` failed: {err}\");\n    });\n}\n\n/// Windows-specific allocator wrapper around `VirtualAlloc` and `VirtualFree`.\n///\n/// Stateless namespace - all operations are associated functions, not methods.\n/// The OS owns the bookkeeping, we just pass the reservation pointer back in for each operation.\n///\n/// # Usage flow\n///\n/// ```ignore\n/// const RESERVED_SIZE: usize = 1 << 32; // 4 GiB\n/// let start_ptr = Mmap::reserve(RESERVED_SIZE).unwrap();\n///\n/// // Offset pointers to anywhere within reservation using `add` and `sub`\n/// // (not `wrapping_add` / `wrapping_sub`), even though this memory is not committed yet\n/// let end_ptr = unsafe { start_ptr.add(RESERVED_SIZE) };\n/// let mid_ptr = unsafe { end_ptr.sub(RESERVED_SIZE / 2) };","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_allocator/src/arena/fixed_size/windows.rs#L434-L470","documentation":"Diagnostic from oxlint's vue/require-default-export rule (crates/oxc_linter/src/rules/vue/require_default_export.rs). It fires when a `.vue` Single-File Component has a plain `<script>` block (and no `<script setup>` block anywhere in the file) but no default export. Vue 3 SFCs must default-export the component; a script that only declares variables or named exports leaves the component empty. The label sits on the closing `</script>` region.","triggerScenarios":"A .vue file whose only `<script>` contains just constants (`const foo = 'foo'`), named exports (`export const foo`), or named re-exports (`export { foo }`) with no `export default`. The rule skips non-.vue files, files with any `<script setup>` block, and files whose module record has a default export. When the script contains no `defineComponent`/`Vue.component` call, this generic 'Missing default export.' variant is used.","commonSituations":"Deleting the export during refactor; utility-style SFCs that only export constants; converting a component to `<script setup>` while leaving a stray plain `<script>`; scaffolding tools generating files without the export.","solutions":["Add `export default { ... }` (or `export default defineComponent({...})`) with the component options.","If the logic lives in `<script setup>`, delete the plain `<script>` block or move its constants into `<script setup>` or a separate .js/.ts module.","If the file is not a component (pure constants/helpers), move it out of the .vue file to a .js/.ts module so the rule no longer applies."],"exampleFix":"// before\n<script>\nconst foo = 'foo';\n</script>\n\n// after\n<script>\nconst foo = 'foo';\nexport default {\n  data() { return { foo }; }\n};\n</script>","handlingStrategy":"validation","validationCode":"// check an SFC has a default export before committing\nfunction hasDefaultExport(sfc) {\n  if (/<script[^>]*\\bsetup\\b/.test(sfc)) return true; // <script setup> supplies the component\n  const i = sfc.indexOf('<script');\n  if (i === -1) return true; // template-only SFC\n  const body = sfc.slice(i, sfc.indexOf('</script>'));\n  return body.includes('export default');\n}\nconst fs = require('fs');\nif (!hasDefaultExport(fs.readFileSync(file, 'utf8'))) {\n  throw new Error(`${file}: SFC lacks a default export`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat every .vue file as a component contract: it must default-export something unless it also has <script setup>.","Run oxlint with the vue plugin in a pre-commit hook so missing exports are caught immediately.","Move shared constants/helpers to .ts modules instead of leaving script-only SFCs."],"tags":["vue","oxlint","lint","sfc","default-export","script"],"backgroundTag":"vue-missing-default-export","analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}