Skip to content

build with -O generate "Bus error: 10" #2888

@patrickkh7788

Description

@patrickkh7788

When build with -O, the code can random run into "Bus error: 10"

remove -O, all work fine.

this is the lldb report:

thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x100711e88)
frame #0: 0x0000000100711e88
-> 0x100711e88: fildll (%rax,%rax)
0x100711e8c: addl %eax, (%rax)
0x100711e8e: addb %al, (%rax)
0x100711e90: sbbb %bl, (%rdi)

LDC - the LLVM D compiler (1.12.0):
based on DMD v2.082.1 and LLVM 7.0.0
built with LDC - the LLVM D compiler (1.12.0)
Default target: x86_64-apple-darwin17.6.0
Host CPU: skylake

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions