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

programm fails when compiled with ldc under OSX #3240

Open
ikod opened this issue Nov 28, 2019 · 4 comments
Open

programm fails when compiled with ldc under OSX #3240

ikod opened this issue Nov 28, 2019 · 4 comments

Comments

@ikod
Copy link

ikod commented Nov 28, 2019

Hello

Program crashes when compiled with ldc2 and works ok when compiled with dmd or when tested on linux

details
OSX 10.15.1, ldc2 - 1.19.0-beta1
reproduce.txt

(lldb) target create "./test"
Current executable set to './test' (x86_64).
(lldb) run
Process 82507 launched: '/tmp/test/test' (x86_64)
test.test.a:
Process 82507 stopped
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001001b6f89 test`_D2rt8monitor_13ensureMonitorFNbC6ObjectZPOSQBqQBq7Monitor + 217
test`_D2rt8monitor_13ensureMonitorFNbC6ObjectZPOSQBqQBq7Monitor:
->  0x1001b6f89 <+217>: movq   (%rax), %rax
    0x1001b6f8c <+220>: testb  $0x1, 0x69(%rax)
    0x1001b6f90 <+224>: jne    0x1001b6ecf               ; <+31>
    0x1001b6f96 <+230>: movl   $0x1, %edi
Target 0: (test) stopped.
(lldb) bt
* thread #2, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001001b6f89 test`_D2rt8monitor_13ensureMonitorFNbC6ObjectZPOSQBqQBq7Monitor + 217
    frame #1: 0x0000000100b046c0
    frame #2: 0x0000000100001110 test`_D4testQf17__unittest_L18_C1FZv at test.d:24:9
    frame #3: 0x0000000100014fd1 test`_D13unit_threaded6runner10reflection__T16moduleUnitTests_S4testQfZQBbFZ__T18addMemberUnittestsSQBlQBoZQBcMFNaNbZ9__lambda2MFZv at reflection.d:268:46
    frame #4: 0x0000000100054d1a test`_D13unit_threaded6runner8testcase16FunctionTestCase4testMFZv(this=0x0000000100b001c0) at testcase.d:218:9
    frame #5: 0x0000000100054d95 test`_D13unit_threaded6runner8testcase15BuiltinTestCase4testMFZv(this=0x0000000100b001c0) at testcase.d:244:13
    frame #6: 0x00000001000546f3 test`_D13unit_threaded6runner8testcase8TestCase6doTestMFZ12__dgliteral2MFNaNiNfZv at testcase.d:101:19
    frame #7: 0x0000000100054531 test`_D13unit_threaded6runner8testcase8TestCase__T5checkTvZQjMFLvZb(this=0x0000000100b001c0, expression=void delegate() @ 0x0000700004755d08) at testcase.d:111:13
    frame #8: 0x00000001000542e1 test`_D13unit_threaded6runner8testcase8TestCase6doTestMFZv(this=0x0000000100b001c0) at testcase.d:101:9
    frame #9: 0x0000000100054182 test`_D13unit_threaded6runner8testcase8TestCase6opCallMFZAAya(this=0x0000000100b001c0) at testcase.d:51:9
    frame #10: 0x00000001000553dc test`_D13unit_threaded6runner9testsuite7runTestFCQBqQBe8testcase8TestCaseZAAya(test=0x0000000100b001c0) at testsuite.d:15:5
    frame #11: 0x000000010005afeb test`_D3std11parallelism8TaskPool__T4amapS_D13unit_threaded6runner9testsuite7runTestFCQBqQBe8testcase8TestCaseZAAyaZ__TQDfTAQBnZQDoMFQkZ4doItMFZv at parallelism.d:1805:29
    frame #12: 0x00000001000ebbe1 test`_D3std11parallelism8TaskPool5doJobMFPSQBkQBj12AbstractTaskZv + 17
    frame #13: 0x00000001000ebd8b test`_D3std11parallelism8TaskPool13startWorkLoopMFZv + 139
    frame #14: 0x0000000100191f05 test`thread_entryPoint + 373
    frame #15: 0x00007fff70cc7d36 libsystem_pthread.dylib`_pthread_start + 125
    frame #16: 0x00007fff70cc458f libsystem_pthread.dylib`thread_start + 15
(lldb) 
@ikod
Copy link
Author

ikod commented Nov 28, 2019

Forgot to mention that it also works ok if started with --DRT-gcopt="disable:1"

@rainers
Copy link
Contributor

rainers commented Nov 28, 2019

Does it also work with disabled parallel marking by the GC, i.e. with --DRT-gcopt="parallel:0"?

@ikod
Copy link
Author

ikod commented Nov 28, 2019

Does it also work with disabled parallel marking by the GC, i.e. with --DRT-gcopt="parallel:0"?

no, still fails:

$ ./test --DRT-gcopt="parallel:0"
test.test.a:
Segmentation fault: 11

@kinke
Copy link
Member

kinke commented Feb 4, 2020

This might be a duplicate of #2187 and fixed in v1.19 final.

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

No branches or pull requests

3 participants