Bug 31396

Summary: Stack overflow while mono loads roslyn CSharpSyntaxGenerator.exe
Product: [Mono] Runtime Reporter: marcos.henrich
Component: JITAssignee: marcos.henrich
Status: RESOLVED FIXED    
Severity: normal CC: mono-bugs+mono, mono-bugs+runtime
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: gdb frames of first seg fault

Description marcos.henrich 2015-06-26 05:42:02 UTC
Created attachment 11747 [details]
gdb frames of first seg fault

Mono runtime crashes with stack overflows while loading roslyn/Binaries/Debug/CSharpSyntaxGenerator.exe

Mono used to build roslyn:https://github.com/esdrubal/mono/commit/8a500077604f92eef57288da224f69490a3e23ab
Roslyn builded:https://github.com/mono/roslyn/commit/d3a855e171d4d815804fae181beaa3fda8665284

The crash also happens while mono master tries to load CSharpSyntaxGenerator.exe.

mono /Users/marcos/dev/roslyn/Binaries/Debug/CSharpSyntaxGenerator.exe
Stack overflow in unmanaged: IP: 0x100c7b149, fault addr: 0x7fff5e98fc90
Stack overflow in unmanaged: IP: 0x100c7b149, fault addr: 0x7fff5e98de40
Stack overflow in unmanaged: IP: 0x7fff8f98d681, fault addr: 0x7fff5e98cff8
Stack overflow in unmanaged: IP: 0x100c7b149, fault addr: 0x7fff5e98bff0
Stack overflow in unmanaged: IP: 0x100c7b149, fault addr: 0x7fff5e98adc0
Stack overflow in unmanaged: IP: 0x100c7286d, fault addr: 0x7fff5e989fd8
Stack overflow in unmanaged: IP: 0x100c7b149, fault addr: 0x7fff5e988f70
Stack overflow: IP: 0x7fff8f98d6f5, fault addr: 0x7fff5e986ff8
Stacktrace:
Comment 1 marcos.henrich 2015-06-26 05:48:31 UTC
The following pull request fixes the bug:
https://github.com/mono/mono/pull/1900
Comment 2 marcos.henrich 2015-07-06 06:53:44 UTC
PR 1900 fixed the stack overflow, but the what was causing cyclic references was a bug on xbuild fixed by the following pull request:

https://github.com/mono/mono/pull/1906

Fixed in master 94e31f159f06fed9aa77c60c43b831fa0ffecc0c.
https://github.com/mono/mono/commit/94e31f159f06fed9aa77c60c43b831fa0ffecc0c