oxc-project/oxc · warning

`VirtualFree` failed during cleanup: {err}

Error message

`VirtualFree` failed during cleanup: {err}

What it means

Diagnostic from oxlint's vue/prop-name-casing rule (crates/oxc_linter/src/rules/vue/prop_name_casing.rs). It enforces one casing convention for prop names — camelCase by default, snake_case via the `caseType` option — across Options API `props` objects, runtime `defineProps({...})` objects, and type-only `defineProps<{...}>` signatures. The message interpolates the offending prop name and the configured case type.

Source

Thrown at crates/oxc_allocator/src/arena/fixed_size/windows.rs:276

            reservation_ptr.add(offset)
        };
        debug_assert!(is_pointer_aligned_to(container_ptr, CONTAINER_ALIGN));

        // Get pointer to the start of the initial committed region within the Container
        // (the region that contains `ChunkFooter`).
        // SAFETY: `INITIAL_COMMITTED_START_OFFSET < CONTAINER_SIZE`, and the Container's `CONTAINER_SIZE` bytes
        // are within the reservation, so `container_ptr + INITIAL_COMMITTED_START_OFFSET` is in bounds.
        let committed_ptr = unsafe { container_ptr.add(INITIAL_COMMITTED_START_OFFSET) };
        debug_assert!(is_pointer_aligned_to(committed_ptr, PAGE_SIZE));

        // Commit the initial region - the last `FIRST_ALLOCATION_GOAL` bytes of the Container.
        // SAFETY: `committed_ptr` is page-aligned and within the reservation we just made.
        let commit_result = unsafe { Mmap::commit(committed_ptr, FIRST_ALLOCATION_GOAL) };
        if commit_result.is_err() {
            // Commit failed - release the reservation before returning.
            // SAFETY: `reservation_ptr` was just returned by `Mmap::reserve(RESERVED_SIZE)`.
            unsafe { Mmap::free(reservation_ptr, RESERVED_SIZE) }.unwrap_or_else(|err| {
                panic!("`VirtualFree` failed during cleanup: {err}");
            });
            return None;
        }

        // Construct the Arena via `from_raw_parts`.
        //
        // It writes the `ChunkFooter` at `start_ptr + INITIAL_CHUNK_SIZE - CHUNK_FOOTER_SIZE`
        // = `container_addr + BLOCK_SIZE - CHUNK_FOOTER_SIZE`, so `ChunkFooter` ends 16 bytes before end of Container.
        // This is the position other code expects it to be.
        //
        // SAFETY:
        // * `committed_ptr` is page-aligned (so `CHUNK_ALIGN`-aligned, since `PAGE_SIZE >= CHUNK_ALIGN`).
        // * `INITIAL_CHUNK_SIZE` is asserted statically to be `>= CHUNK_FOOTER_SIZE` and a multiple of `CHUNK_ALIGN`.
        // * `committed_ptr..committed_ptr + INITIAL_CHUNK_SIZE` lies within
        //   `reservation_ptr..reservation_ptr + RESERVED_SIZE`: The Container is within the reservation,
        //   and `committed_ptr + INITIAL_CHUNK_SIZE` = Block end <= Container end <= Reserved end.
        // * The reservation was made via `VirtualAlloc` with `MEM_RESERVE`. The Arena's `Drop` impl
        //   delegates to `dealloc_fixed_size_arena_chunk` (because `is_fixed_size` is `true`),

View on GitHub (pinned to e1e7af627c)

Solutions

  1. Rename the prop to camelCase (default convention): 'first-name' -> firstName; templates can still pass it as kebab-case attribute.
  2. If the team standard is snake_case, configure the rule: { "vue/prop-name-casing": ["error", { "caseType": "snake_case" }] }.
  3. Update component consumers after renaming — Vue automatically maps kebab-case attributes to camelCase props.

Example fix

// before (caseType: camelCase)
export default {
  props: { 'item-count': Number }
}

// after
export default {
  props: { itemCount: Number }
}
Defensive patterns

Strategy: validation

Validate before calling

// validate prop-name casing while authoring props objects
function propCasingOk(name, convention = 'camelCase') {
  return convention === 'camelCase'
    ? /^[a-z][a-zA-Z0-9]*$/.test(name)
    : /^[a-z][a-z0-9_]*$/.test(name);
}
function checkProps(defs, convention) {
  for (const name of Object.keys(defs)) {
    if (!propCasingOk(name, convention)) throw new Error(`prop '${name}' violates ${convention}`);
  }
}

Prevention

When it happens

Trigger: Declaring a prop whose name does not match the configured case: `props: { 'first-name': String }` under camelCase, or `defineProps({ userName: String })` under snake_case. Vue component options objects (excluding component instances) and defineProps forms are both inspected; kebab-case names trip camelCase mode, camelCase names trip snake_case mode.

Common situations: HTML-first teams writing kebab-case prop names ('first-name') in JS; backend/Python teams preferring snake_case; merged codebases with mixed conventions; refactoring from array syntax `props: ['first-name']` to object syntax.

Related errors


AI-assisted analysis of oxc-project/oxc@e1e7af627c (2026-08-20). Data as JSON: /api/errors/ee1a6d827b2ba594. Report an issue: GitHub.