Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible use-after-free in codegen #22973

Closed
JeffBezanson opened this issue Jul 27, 2017 · 0 comments
Closed

possible use-after-free in codegen #22973

JeffBezanson opened this issue Jul 27, 2017 · 0 comments
Labels
compiler:codegen Generation of LLVM IR and native code

Comments

@JeffBezanson
Copy link
Member

From valgrind:

==14927== Invalid read of size 8
==14927==    at 0x4F0151F: llvm::Use::getNext() const (Use.h:108)
==14927==    by 0x4F69F60: llvm::Value::use_iterator_impl<llvm::Use>::operator++() (Value.h:134)
==14927==    by 0x4F52903: emit_function(_jl_method_instance_t*, _jl_code_info_t*, unsigned long, _jl_llvm_functions_t*, jl_cgparams_t const*) (codegen.cpp:5846)
==14927==    by 0x4F1DAB7: jl_compile_linfo (codegen.cpp:1153)
==14927==    by 0x4F1E6BA: jl_generate_fptr (codegen.cpp:1366)
==14927==    by 0x4E6C89B: jl_compile_method_internal (julia_internal.h:357)
==14927==    by 0x4E6CA0F: jl_call_method_internal (julia_internal.h:385)
==14927==    by 0x4E73116: jl_apply_generic (gf.c:1929)
==14927==    by 0x40555F4: ??? (in /run/shm/julia-codegen-14927-846930886 (deleted))
==14927==    by 0x4E79F29: jl_call_fptr_internal (julia_internal.h:370)
==14927==    by 0x4E7A03A: jl_call_method_internal (julia_internal.h:389)
==14927==    by 0x4E7A944: fl_invoke_julia_macro (ast.c:220)
==14927==  Address 0xf9654e8 is 8 bytes inside a block of size 88 free'd
==14927==    at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14927==    by 0x66659C0: llvm::Instruction::eraseFromParent() (in /home/jeff/src/julia/usr/lib/libLLVM-3.9.so)
==14927==    by 0x4F528F4: emit_function(_jl_method_instance_t*, _jl_code_info_t*, unsigned long, _jl_llvm_functions_t*, jl_cgparams_t const*) (codegen.cpp:5848)
==14927==    by 0x4F1DAB7: jl_compile_linfo (codegen.cpp:1153)
==14927==    by 0x4F1E6BA: jl_generate_fptr (codegen.cpp:1366)
==14927==    by 0x4E6C89B: jl_compile_method_internal (julia_internal.h:357)
@JeffBezanson JeffBezanson added the compiler:codegen Generation of LLVM IR and native code label Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:codegen Generation of LLVM IR and native code
Projects
None yet
Development

No branches or pull requests

1 participant