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

alr pin crashes with SIGABRT on OpenBSD #1210

Open
JeremyGrosser opened this issue Oct 4, 2022 · 2 comments
Open

alr pin crashes with SIGABRT on OpenBSD #1210

JeremyGrosser opened this issue Oct 4, 2022 · 2 comments

Comments

@JeremyGrosser
Copy link
Contributor

JeremyGrosser commented Oct 4, 2022

I think this is related to the issue I ran into on aarch64 Linux, commented in issue #1012.

   type Portable_Path is new String with
      Dynamic_Predicate => (for all Char of Portable_Path => Char /= '\');
   --  A portable path always uses forward slashes. For use in the current
   --  platform, it should be adapted first.

Whenever the dynamic predicate on Portable_Path is executed, alr crashes with SIGABRT on OpenBSD 7.1 with GNAT 11.2.0 from the ports collection (gnat_external from alire's point of view).

With ktrace, I was able to determine the abort reason as "reversed memcpy". My understanding is that this is thrown when the src and dst arguments to memcpy overlap. I have no idea why GNAT would do that.

As in my comment on the other issue, adding Alignment => 2 to the Portable_Path type appears to fix the crash. This feels like a workaround for a compiler bug though, so I'm not sure that patching Alire is the right approach.

I'm reporting this issue here for visibility, but I think it needs more investigation to understand why GNAT is generating code this way.

@Fabien-Chouteau
Copy link
Member

@JeremyGrosser it would be great if you can make a smaller reproducer for this issue.

@dalybrown
Copy link
Contributor

This might have addressed this issue: #1541.

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