davidgiven / cpm65

CP/M for the 6502
BSD 2-Clause "Simplified" License
267 stars 23 forks source link

munmap_chunk(): invalid pointer #130

Closed mrgw454 closed 2 months ago

mrgw454 commented 6 months ago

Getting this error during the build process:

MKCBMFS src/arch/commodore+c64_cbmfs
munmap_chunk(): invalid pointer
make: *** [.obj/build.mk:1216: .obj/src/arch/commodore+c64_cbmfs/src/arch/commodore+c64_cbmfs.img] Error 1
make: *** [.obj/build.mk:1475: .obj/src/arch/commodore+pet4032_cbmfs/src/arch/commodore+pet4032_cbmfs.img] Error 1
make: *** [.obj/build.mk:1543: .obj/src/arch/commodore+pet8032_cbmfs/src/arch/commodore+pet8032_cbmfs.img] Error 1
make: *** [.obj/build.mk:1611: .obj/src/arch/commodore+pet8096_cbmfs/src/arch/commodore+pet8096_cbmfs.img] Error 1
make: *** [.obj/build.mk:1714: .obj/src/arch/commodore+vic20_cbmfs/src/arch/commodore+vic20_cbmfs.img] Error 1

Thank you for any help you can provide.

davidgiven commented 6 months ago

Wut.

What system are you using?

mrgw454 commented 6 months ago

I am currently using a Debian 12 (Bookworm) system (arch64) with fresh copies of the following projects built from source:

cpmtools
llvm-mos-sdk
llvm-mos
vice (for cc1541)

... and from Debian repo:

fp
libfmt-dev
python3

I do build quite a few other retro based projects. I thought a pointer error was strange as well.

Could it be something I missed during the build process for llvm-mos or llvm-mos-sdk? No errors, but that doesn't mean I didn't miss a configuration option when compiling them.

It looks like some other targets completed:

-rw-r--r-- 1 ron ron 1048336 Mar 26 16:03 atari800xlhd.atr
-rw-r--r-- 1 ron ron 1048336 Mar 26 16:03 atari800hd.atr
-rw-r--r-- 1 ron ron   92176 Mar 26 16:03 atari800.atr
-rw-r--r-- 1 ron ron  143360 Mar 26 16:03 apple2e.po
-rw-r--r-- 1 ron ron  512256 Mar 26 16:03 oric.dsk
-rw-r--r-- 1 ron ron  204800 Mar 26 16:03 bbcmicro.ssd
davidgiven commented 6 months ago

If you do make V=1 it'll show you the commands lines it's invoking. Try running the mkcpmfs command with valgrind. With luck that will give more details.

mrgw454 commented 6 months ago

omg -- found it. I had a copy of cc1541 that was causing the issue. I built a new version and everything worked. Your suggestion of adding the -V as part of 'make' revealed this.

Thanks again for the help and your patience with me!

-Ron