lambdaclass / cairo_native

A compiler to convert Cairo's intermediate representation "Sierra" code to MLIR.
https://lambdaclass.github.io/cairo_native/cairo_native
Apache License 2.0
116 stars 44 forks source link

bug: pointer being freed was not allocated #805

Open enitrat opened 4 days ago

enitrat commented 4 days ago

Bug: running our test suite using native on blockifier yields:

stEIP1559-360983995c1e0aa5(21161,0x16bf1b000) malloc: *** error for object 0x60000d596060: pointer being freed was not allocated
stEIP1559-360983995c1e0aa5(21161,0x16bf1b000) malloc: *** set a breakpoint in malloc_error_break to debug

Repro with LLVM19

Repro:

clone ef-tests, ensure correct branch git checkout feat/cairo-native make make setup-kakarot cargo test test_baseFeeDiffPlaces_d0g0v0_Cancun --features v1,native -- --nocapture (with LLVM19)

Expected behavior: No unexpected crash

enitrat commented 3 days ago

UPDATE:

I updated native to use update-llvm19

Now, https://github.com/lambdaclass/cairo_native/issues/806 yields the same error, when running

cargo test test_baseFeeDiffPlaces_d0g0v0_Cancun --features v1,native -- --nocapture

stEIP1559-ef029f0211f7289b(4664,0x16dedf000) malloc: *** error for object 0x60000f968760: pointer being freed was not allocated
stEIP1559-ef029f0211f7289b(4664,0x16dedf000) malloc: *** set a breakpoint in malloc_error_break to debug
  1. Sequencer fork now uses update-llvm-19 branch
  2. EF-Test repo now uses update-llvm-19 branch