New: duma package
https://bugs.busybox.net/show_bug.cgi?id=12196
Bug ID: 12196
Summary: duma package
Product: buildroot
Version: unspecified
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: ioctl at ya.ru
CC: buildroot at uclibc.org
Target Milestone: ---
Duma package build is incorrect. Following original GNUmakefile, it should be build with -O0, but buildroot make it with -O2, that leads to the "Illegal instruction" problem with my program for ARM cpu. This can be fixed by adding "CFLAGS+=-O0 \" into the DUMA_BUILD_CMDS definition in duma.mk.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] duma package
https://bugs.busybox.net/show_bug.cgi?id=12196
--- Comment #1 from Thomas Petazzoni <[email protected]> --- THanks for your bug report. However, the real question is why is duma failing in -O2 ? Rather than forcing -O0, it seems much more relevant to understand why it does not work when compiled in -O2.
Could you get a core dump, and see on which instruction it crashes ? Which ARM processor are you using ?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] duma package
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
--- Comment #2 from Aleksey <[email protected]> ---
Its a specific debug tool, that works on low level, so, I think, author of the duma has a reason to use -O0 in original GNUmakefile.
However, we can try to understand this reason.
Unfortunately I was unable to get core dump in buildroot environment. How can I do it?
As for the CPU, its a Marvell SOC. I have the following options in the configuration:
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ABI="aapcs-linux"
BR2_GCC_TARGET_CPU="marvell-pj4"
BR2_GCC_TARGET_FPU="vfpv3-d16"
BR2_GCC_TARGET_FLOAT_ABI="softfp"
BR2_GCC_TARGET_MODE="arm"
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] duma package
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |NEEDINFO--- Comment #3 from Thomas Petazzoni <[email protected]> --- Run "ulimit -c unlimited" before starting duma, and you will get a core dump.
Which Marvell processor are you using ?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] duma package
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
--- Comment #4 from Aleksey <[email protected]> ---
Created attachment 8306
--> https://bugs.busybox.net/attachment.cgi?id=8306&action=edit
Duma core dump test
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] duma package
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
--- Comment #5 from Aleksey <[email protected]> --- It's on the Marvell Poncat3 SOC CPU. Program text:
#include <stdio.h>
int main()
{
char *a;
a = malloc(1024);
a = realloc((void*)a, 2048);
free(a);
return 0;
}Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] duma package
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
Aleksey <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|NEEDINFO |---Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] duma package
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
--- Comment #6 from Arnout Vandecappelle <[email protected]> --- Really weird... This is the disassembly around the faulting instruction:
0xb6e04694 <+672>: b 0xb6e046dc <__gettextparse+744> 0xb6e04698 <+676>: b 0xb6e046dc <__gettextparse+744> => 0xb6e0469c <+680>: b 0xb6e04ab8 <__gettextparse+1732> 0xb6e046a0 <+684>: b 0xb6e04a94 <__gettextparse+1696> 0xb6e046a4 <+688>: b 0xb6e049fc <__gettextparse+1544> 0xb6e046a8 <+692>: b 0xb6e049e4 <__gettextparse+1520>
So it's in the middle of a switch table, simple relative branch instruction 0xea000105. The instructions that it jumps to all look pretty normal as well.
However, duma does do weird things with the code. It is possible that the real fault is hidden by some exception handling within duma itself... gdb isn't able to print a proper backtrace, so that could be an indication...
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] Illegal instruction in "duma" when built with -O2
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|duma package |Illegal instruction in
| |"duma" when built with -O2Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12196] Illegal instruction in "duma" when built with -O2
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12196
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected] Status|REOPENED |RESOLVED Resolution|--- |MOVED
--- Comment #7 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