Skip to contentSkip to conversation

New: segmentation fault in busybox/glibc due to CONFIG_STACK_OPTIMIZATION_386

Buildroot [email protected] 1 participant 4 messages Mar 25, 2023 – Jun 15, 2024

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=15491

            Bug ID: 15491
           Summary: segmentation fault in busybox/glibc due to
                    CONFIG_STACK_OPTIMIZATION_386
           Product: buildroot
           Version: 2023.02
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Target Milestone: ---

Hi,

i was facing the issue that busybox (ls appled) was generating a random segmentation fault in libc/ctime() (i386 platform, glibc 2.30). The actual problem was that CONFIG_STACK_OPTIMIZATION_386 was set by default, causing an 8 byte aligned stack, and glibc uses a movaps instruction on it (which requires 16 byte alignment).

Obviously i could solve this by disabling CONFIG_STACK_OPTIMIZATION_386, but it took me quite a while to find it out.

This really should be disabled by default. After some digging it seems that the ABI nowadays mandates 16 byte stack alignment even for i386 (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38496).

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

[Buildroot] [Bug 15491] segmentation fault in busybox/glibc due to CONFIG_STACK_OPTIMIZATION_386

https://bugs.busybox.net/show_bug.cgi?id=15491

Felix Schmidt <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

               Host|                            |Embedded Atom CE2752
              Build|                            |Linux x86
             Target|                            |i686-buildroot-linux-gnu
Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

[Buildroot] [Bug 15491] segmentation fault in busybox/glibc due to CONFIG_STACK_OPTIMIZATION_386

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15491

--- Comment #1 from Thomas Petazzoni <[email protected]> --- See also this patch and the discussion:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

[Buildroot] [Bug 15491] segmentation fault in busybox/glibc due to CONFIG_STACK_OPTIMIZATION_386

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15491

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #2 from Yann E. MORIN <[email protected]> --- Thank you for your report.

The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker.

Thank you!

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot