All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 12196] New: duma package
@ 2019-09-06  8:31 bugzilla at busybox.net
  2019-09-11 13:30 ` [Buildroot] [Bug 12196] " bugzilla at busybox.net
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-09-06  8:31 UTC (permalink / raw)
  To: buildroot

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] duma package
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
@ 2019-09-11 13:30 ` bugzilla at busybox.net
  2019-09-17  8:32 ` bugzilla at busybox.net
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-09-11 13:30 UTC (permalink / raw)
  To: buildroot

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

--- Comment #1 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
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 ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] duma package
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
  2019-09-11 13:30 ` [Buildroot] [Bug 12196] " bugzilla at busybox.net
@ 2019-09-17  8:32 ` bugzilla at busybox.net
  2019-11-27 20:40 ` bugzilla at busybox.net
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-09-17  8:32 UTC (permalink / raw)
  To: buildroot

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

--- Comment #2 from Aleksey <ioctl@ya.ru> ---
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"

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] duma package
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
  2019-09-11 13:30 ` [Buildroot] [Bug 12196] " bugzilla at busybox.net
  2019-09-17  8:32 ` bugzilla at busybox.net
@ 2019-11-27 20:40 ` bugzilla at busybox.net
  2019-12-09 10:53 ` bugzilla at busybox.net
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-11-27 20:40 UTC (permalink / raw)
  To: buildroot

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

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |NEEDINFO

--- Comment #3 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
Run "ulimit -c unlimited" before starting duma, and you will get a core dump.

Which Marvell processor are you using ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] duma package
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
                   ` (2 preceding siblings ...)
  2019-11-27 20:40 ` bugzilla at busybox.net
@ 2019-12-09 10:53 ` bugzilla at busybox.net
  2019-12-09 10:55 ` bugzilla at busybox.net
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-12-09 10:53 UTC (permalink / raw)
  To: buildroot

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

--- Comment #4 from Aleksey <ioctl@ya.ru> ---
Created attachment 8306
  --> https://bugs.busybox.net/attachment.cgi?id=8306&action=edit
Duma core dump test

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] duma package
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
                   ` (3 preceding siblings ...)
  2019-12-09 10:53 ` bugzilla at busybox.net
@ 2019-12-09 10:55 ` bugzilla at busybox.net
  2019-12-09 10:55 ` bugzilla at busybox.net
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-12-09 10:55 UTC (permalink / raw)
  To: buildroot

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

--- Comment #5 from Aleksey <ioctl@ya.ru> ---
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;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] duma package
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
                   ` (4 preceding siblings ...)
  2019-12-09 10:55 ` bugzilla at busybox.net
@ 2019-12-09 10:55 ` bugzilla at busybox.net
  2019-12-13 22:34 ` bugzilla at busybox.net
  2020-05-20 14:38 ` [Buildroot] [Bug 12196] Illegal instruction in "duma" when built with -O2 bugzilla at busybox.net
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-12-09 10:55 UTC (permalink / raw)
  To: buildroot

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

Aleksey <ioctl@ya.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|NEEDINFO                    |---

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] duma package
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
                   ` (5 preceding siblings ...)
  2019-12-09 10:55 ` bugzilla at busybox.net
@ 2019-12-13 22:34 ` bugzilla at busybox.net
  2020-05-20 14:38 ` [Buildroot] [Bug 12196] Illegal instruction in "duma" when built with -O2 bugzilla at busybox.net
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2019-12-13 22:34 UTC (permalink / raw)
  To: buildroot

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

--- Comment #6 from Arnout Vandecappelle <arnout@mind.be> ---
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...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 12196] Illegal instruction in "duma" when built with -O2
  2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
                   ` (6 preceding siblings ...)
  2019-12-13 22:34 ` bugzilla at busybox.net
@ 2020-05-20 14:38 ` bugzilla at busybox.net
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2020-05-20 14:38 UTC (permalink / raw)
  To: buildroot

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

Thomas Petazzoni <thomas.petazzoni@bootlin.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|duma package                |Illegal instruction in
                   |                            |"duma" when built with -O2

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-20 14:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06  8:31 [Buildroot] [Bug 12196] New: duma package bugzilla at busybox.net
2019-09-11 13:30 ` [Buildroot] [Bug 12196] " bugzilla at busybox.net
2019-09-17  8:32 ` bugzilla at busybox.net
2019-11-27 20:40 ` bugzilla at busybox.net
2019-12-09 10:53 ` bugzilla at busybox.net
2019-12-09 10:55 ` bugzilla at busybox.net
2019-12-09 10:55 ` bugzilla at busybox.net
2019-12-13 22:34 ` bugzilla at busybox.net
2020-05-20 14:38 ` [Buildroot] [Bug 12196] Illegal instruction in "duma" when built with -O2 bugzilla at busybox.net

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.