You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
==8618== Memcheck, a memory error detector
==8618== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==8618== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==8618== Command: zig build-exe asdf.zig
==8618==
==8618== Invalid read of size 8
==8618== at 0x541F22C: LLVMBuildInBoundsGEP (in /usr/lib/libLLVM-9.so)
==8618== by 0xBBC3AC: ir_render_slice(CodeGen*, IrExecutableGen*, IrInstGenSlice*) (codegen.cpp:5455)
==8618== by 0xBC07E5: ir_render_instruction(CodeGen*, IrExecutableGen*, IrInstGen*) (codegen.cpp:6456)
==8618== by 0xBC0EE6: ir_render(CodeGen*, ZigFn*) (codegen.cpp:6576)
==8618== by 0xBC7211: do_code_gen(CodeGen*) (codegen.cpp:7935)
==8618== by 0xBD2379: codegen_build_and_link(CodeGen*) (codegen.cpp:10689)
==8618== by 0xBA3130: main0(int, char**) (main.cpp:1256)
==8618== by 0xBA3A2C: main (main.cpp:1407)
==8618== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==8618==
Segmentation fault at address 0x0
???:?:?: 0x541f22c in ??? (???)
==8618== Warning: set address range perms: large range [0x59c83000, 0x7048c000) (defined)
==8618== Warning: set address range perms: large range [0x59c83000, 0x7048c000) (undefined)
==8618== Warning: set address range perms: large range [0x7048c000, 0x9209a000) (defined)
==8618== Warning: set address range perms: large range [0x7048c000, 0x9209a000) (undefined)
==8618== Warning: set address range perms: large range [0x9209a000, 0xc4aaf000) (defined)
==8618== Warning: set address range perms: large range [0x9209a000, 0xc4aaf000) (undefined)
???:?:?: 0xbc07e5 in ir_render_instruction (/home/joachim/src/zig/src/codegen.cpp)
???:?:?: 0xbc0ee6 in ir_render (/home/joachim/src/zig/src/codegen.cpp)
???:?:?: 0xbc7211 in do_code_gen (/home/joachim/src/zig/src/codegen.cpp)
???:?:?: 0xbd2379 in codegen_build_and_link (/home/joachim/src/zig/src/codegen.cpp)
???:?:?: 0xba3130 in main0 (/home/joachim/src/zig/src/main.cpp)
???:?:?: 0xba3a2c in main (/home/joachim/src/zig/src/main.cpp)
==8618==
==8618== Process terminating with default action of signal 6 (SIGABRT)
==8618== at 0x9A33931: raise (raise.c:51)
==8618== by 0x9A1D55A: abort (abort.c:79)
==8618== by 0xCDF098: std.os.abort (os.zig:213)
==8618== by 0xCFB2AA: std.debug.handleSegfaultLinux (debug.zig:1734)
==8618== by 0x961411F: ??? (in /usr/lib/libpthread-2.30.so)
==8618== by 0x541F22B: LLVMBuildInBoundsGEP (in /usr/lib/libLLVM-9.so)
==8618== by 0xBBC3AC: ir_render_slice(CodeGen*, IrExecutableGen*, IrInstGenSlice*) (codegen.cpp:5455)
==8618== by 0xBC07E5: ir_render_instruction(CodeGen*, IrExecutableGen*, IrInstGen*) (codegen.cpp:6456)
==8618== by 0xBC0EE6: ir_render(CodeGen*, ZigFn*) (codegen.cpp:6576)
==8618== by 0xBC7211: do_code_gen(CodeGen*) (codegen.cpp:7935)
==8618== by 0xBD2379: codegen_build_and_link(CodeGen*) (codegen.cpp:10689)
==8618== by 0xBA3130: main0(int, char**) (main.cpp:1256)
==8618==
==8618== HEAP SUMMARY:
==8618== in use at exit: 117,146,740 bytes in 900,504 blocks
==8618== total heap usage: 1,288,643 allocs, 388,139 frees, 167,215,472 bytes allocated
==8618==
==8618== LEAK SUMMARY:
==8618== definitely lost: 9,063,466 bytes in 136,116 blocks
==8618== indirectly lost: 5,000,198 bytes in 76,969 blocks
==8618== possibly lost: 34,342,479 bytes in 146,765 blocks
==8618== still reachable: 68,740,597 bytes in 540,654 blocks
==8618== suppressed: 0 bytes in 0 blocks
==8618== Rerun with --leak-check=full to see details of leaked memory
==8618==
==8618== For lists of detected and suppressed errors, rerun with: -s
==8618== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
The text was updated successfully, but these errors were encountered:
andrewrk
added
bug
Observed behavior contradicts documented or intended behavior
stage1
The process of building from source via WebAssembly and the C backend.
labels
Mar 17, 2020
I don't know if this is related to another issue, but when compiling this code with zig from a2432b6, a segmentation fault occurs:
Here's the valgrind output:
The text was updated successfully, but these errors were encountered: