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

Workaround buggy offset debug info values #7335

Merged
merged 1 commit into from
Jan 24, 2019

Conversation

bcardiff
Copy link
Member

I've narrow a bit where the overflow was generated, but is more related to buggy debug information that is being generated or obtained.

This occur in def create_debug_type(type : InstanceVarContainer) only for LibC::PthreadMutexT#@__align so far.

Now instead of failing the debug info on that field is skipped. The other members of the struct were also created without debug info.

Some build where I extract additional traces of the issue:

WARN: check_overflow src/compiler/crystal/codegen/debug.cr:126:11 in 'create_debug_type' LibC::PthreadMutexT @__align offset: 6593625271604084736
      @__data idx: 0  -- no type --
      @__size idx: 1  -- no type --
      @__align  idx: 2  offset: 6593625271604084736 size: 32

WARN: check_overflow src/compiler/crystal/codegen/debug.cr:126:11 in 'create_debug_type' LibC::PthreadMutexT @__align offset: 6593962857292369312
      @__data idx: 0  -- no type --
      @__size idx: 1  -- no type --
      @__align  idx: 2  offset: 6593962857292369312 size: 32

WARN: check_overflow src/compiler/crystal/codegen/debug.cr:126:11 in 'create_debug_type' LibC::PthreadMutexT @__align offset: 8030606727934340709
      @__data idx: 0  -- no type --
      @__size idx: 1  -- no type --
      @__align  idx: 2  offset: 8030606727934340709 size: 64

WARN: check_overflow src/compiler/crystal/codegen/debug.cr:126:11 in 'create_debug_type' LibC::PthreadMutexT @__align offset: 4611686018427387909
      @__data idx: 0  -- no type --
      @__size idx: 1  -- no type --
      @__align  idx: 2  offset: 4611686018427387909 size: 64

@bcardiff bcardiff added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:debugger labels Jan 24, 2019
@bcardiff bcardiff added this to the 0.27.1 milestone Jan 24, 2019
@bcardiff bcardiff requested a review from asterite January 24, 2019 15:22
Copy link
Member

@asterite asterite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can move forward with this and investigate why it's happening later. Maybe if you have reproducible code @ysbaddaden might be able to fix it.

@bcardiff
Copy link
Member Author

If only it would be deterministic :-). Maybe is scoped to the usage of llvm in the context of the codegen specs that could be processing the prelude multiple times accross the whole run.

@bcardiff bcardiff merged commit 30f7c70 into crystal-lang:master Jan 24, 2019
@bcardiff bcardiff deleted the fix/skip-buggy-debug-info branch January 24, 2019 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:debugger
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants