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

Out of bounds exception in x86-64-linux compiler when using -dwarf=true -symbols=true #310

Open
k-sareen opened this issue Dec 6, 2024 · 2 comments

Comments

@k-sareen
Copy link
Contributor

k-sareen commented Dec 6, 2024

$ V3C_OPTS="-dwarf=true -symbols=true" aeneas bootstrap

gives me

Compiling (/home/$USER/git/virgil/bin/bootstrap/x86-linux/Aeneas -> /home/$USER/git/virgil/bin/current/x86-64-linux/Aeneas)...
!BoundsCheckException
        in SsaX86_64Gen.assemble() [aeneas/src/x86-64/SsaX86_64Gen.v3 @ 879:49]
        in SsaMachGen.assembleInstrs() [aeneas/src/mach/MachBackend.v3 @ 1069:33]
        in X86_64Backend.genCodeFromSsa() [aeneas/src/x86-64/X86_64Backend.v3 @ 145:39]
        in MachBackend.genAllCode() [aeneas/src/mach/MachBackend.v3 @ 1343:39]
        in LinuxTarget.emit() [aeneas/src/os/Linux.v3 @ 128:35]
        in Compilation.emit() [aeneas/src/main/Compiler.v3 @ 268:45]
        in Compilation.compile() [aeneas/src/main/Compiler.v3 @ 184:32]
        in Aeneas.compile() [aeneas/src/main/Aeneas.v3 @ 81:56]
        in Aeneas.main() [aeneas/src/main/Aeneas.v3 @ 25:39]

for the x86-64-linux target.

Originally posted by @k-sareen in #308 (comment)

@titzer
Copy link
Owner

titzer commented Dec 9, 2024

I've fixed one of these bugs, but there are couple more lurking. The handling of debug information in the middle of the compiler isn't well-tested and it looks like SsaDeleteVar needs added type information for normalization.

@k-sareen
Copy link
Contributor Author

Ah thanks. Is debug information not stable yet? It'd be good to just have them always on. And it'd shake the compiler a bit more so that bugs like these are caught.

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

2 participants