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

code_native corrupt output for called function names #29588

Closed
c42f opened this issue Oct 11, 2018 · 3 comments · Fixed by #41789
Closed

code_native corrupt output for called function names #29588

c42f opened this issue Oct 11, 2018 · 3 comments · Fixed by #41789

Comments

@c42f
Copy link
Member

c42f commented Oct 11, 2018

code_native gives nonsense for the names of some functions on latest master. For example, consider the annotation next to the callq below:

$ ./julia 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.1.0-DEV.440 (2018-10-10)
 _/ |\__'_|_|_|\__'_|  |  Commit e20d1ee686* (0 days old master)
|__/                   |

julia> code_native(maximum, Tuple{Vector{Int}})
	.text
; Function maximum {
; Location: reducedim.jl:645
; Function #maximum#541; {
; Location: reducedim.jl:645
; Function _maximum; {
; Location: reducedim.jl:649
; Function _maximum; {
; Location: reducedim.jl:650
; Function mapreduce; {
; Location: reducedim.jl:301
; Function #mapreduce#535; {
; Location: reducedim.jl:301
; Function _mapreduce_dim; {
; Location: reducedim.jl:645
	pushq	%rax
	callq	"size;"
;}}}}}}
	popq	%rcx
	retq
	nopl	(%rax,%rax)
;}

I came across this while searching for the cause of the segfault in the tests over at #28878 (https://travis-ci.org/JuliaLang/julia/jobs/438390168).

Possibly related: #28046

@c42f c42f mentioned this issue Oct 11, 2018
10 tasks
@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 11, 2018

It's always done this (somewhat at random)—it's the expected behavior currently.

@c42f
Copy link
Member Author

c42f commented Oct 11, 2018

Ok, which is it:

  1. "We" (not myself!) know why it's happening and it's annoying but harmless
  2. Nobody knows why it's happening, and it could well be the source of a latent memory bug leading to the segfault I'm seeing.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 11, 2018

Expected to be 1: annoying, but harmless. The process by which we emit these names is heuristic-driven, but should be valid.

vtjnash added a commit that referenced this issue Aug 4, 2021
The less reliable (and less verbose) disassembly version is selectable
with dump_module=false.

Fixes #38035
Fixes #29588
Fixes #39661
vtjnash added a commit that referenced this issue Aug 9, 2021
The less reliable (and less verbose) disassembly version is selectable
with dump_module=false.

Fixes #38035
Fixes #29588
Fixes #39661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants