Files
codebase-memory-mcp/vendored/nomic/code_vectors_blob.S
Martin Vogel 74c5697d20 Fix ASan leak in corpus token_map and Windows/Linux vector blob assembly
- semantic.c: free strdup'd keys+values in token_map via cbm_ht_foreach
  before cbm_ht_free (44KB leak in 7920 allocations)
- code_vectors_blob.S: add Windows COFF branch (.rdata,"dr") alongside
  macOS Mach-O and Linux ELF sections
2026-04-06 13:43:48 +02:00

46 lines
1.3 KiB
ArmAsm

/* nomic-embed-code vector blob embedded via assembler.
* Cross-platform: macOS (Mach-O) vs Linux (ELF) vs Windows (COFF). */
#if defined(__APPLE__)
.section __DATA,__const
.globl _PRETRAINED_VECTOR_BLOB
.globl _PRETRAINED_VECTOR_BLOB_LEN
.p2align 4
_PRETRAINED_VECTOR_BLOB:
.incbin "vendored/nomic/code_vectors.bin"
_PRETRAINED_VECTOR_BLOB_END:
.section __DATA,__const
.p2align 2
_PRETRAINED_VECTOR_BLOB_LEN:
.long _PRETRAINED_VECTOR_BLOB_END - _PRETRAINED_VECTOR_BLOB
#elif defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
.section .rdata,"dr"
.globl PRETRAINED_VECTOR_BLOB
.globl PRETRAINED_VECTOR_BLOB_LEN
.p2align 4
PRETRAINED_VECTOR_BLOB:
.incbin "vendored/nomic/code_vectors.bin"
PRETRAINED_VECTOR_BLOB_END:
.section .rdata,"dr"
.p2align 2
PRETRAINED_VECTOR_BLOB_LEN:
.long PRETRAINED_VECTOR_BLOB_END - PRETRAINED_VECTOR_BLOB
#else
.section .rodata,"a",@progbits
.globl PRETRAINED_VECTOR_BLOB
.globl PRETRAINED_VECTOR_BLOB_LEN
.p2align 4
PRETRAINED_VECTOR_BLOB:
.incbin "vendored/nomic/code_vectors.bin"
PRETRAINED_VECTOR_BLOB_END:
.section .rodata,"a",@progbits
.p2align 2
PRETRAINED_VECTOR_BLOB_LEN:
.long PRETRAINED_VECTOR_BLOB_END - PRETRAINED_VECTOR_BLOB
#endif