Bug 1677173 - gprbuild smashes stack on armv7hl
Summary: gprbuild smashes stack on armv7hl
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker 1674679 1675351
TreeView+ depends on / blocked
 
Reported: 2019-02-14 08:22 UTC by Pavel Zhukov
Modified: 2019-08-13 19:13 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
GNU Compiler Collection 89493 None None None 2019-04-24 07:50:58 UTC

Description Pavel Zhukov 2019-02-14 08:22:14 UTC
Description of problem:
while processing of gpr file with artifacts containing wildcards gprbuild smashes stack on armv7hl other architectures work fine)


Version-Release number of selected component (if applicable):
gprbuild-2018-12.fc30

How reproducible:
100%

Steps to Reproduce:
1. Build aws in koji/mock

Actual results:
Install project AWS - relocatable
warning: file does not exist '/builddir/build/BUILD/aws-gpl-2018-src/docs/build/latex/*.pdf'
BUILDSTDERR: *** stack smashing detected ***: <unknown> terminated

readlink("/builddir/build/BUILDROOT/aws-2018-2.fc30.1.debug.arm/usr/share/gpr/manifests/aws", 0xbeeb5c20, 4098) = -1 EINVAL (Invalid argument)
getdents64(4, /* 0 entries */, 32768)   = 0
close(4)                                = 0
stat64("/builddir/build/BUILD/aws-gpl-2018-src/docs/build/latex/", 0xbeeb6f50) = -1 ENOENT (No such file or directory)
write(1, "warning: file does not exist '/b"..., 93warning: file does not exist '/builddir/build/BUILD/aws-gpl-2018-src/docs/build/latex/*.pdf'
) = 93
writev(2, [{iov_base="*** ", iov_len=4}, {iov_base="stack smashing detected", iov_len=23}, {iov_base=" ***: ", iov_len=6}, {iov_base="<unknown>", iov_len=9}, {iov_base=" terminated\n", iov_len=12}], 5*** stack smashing detected ***: <unknown> terminated
) = 54
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f91000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid()                                = 18399
gettid()                                = 18399
tgkill(18399, 18399, SIGABRT)           = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=18399, si_uid=0} ---
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xbf6e86fc} ---
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xfffffffd} ---


Expected results:


Additional info:

Comment 1 Pavel Zhukov 2019-02-21 19:36:40 UTC
It appears to be compiler bug.

How to reproduce:
1) install gprbuild on armv7hl machine
2) create project file with following content:
project Gprbuild is

   package Install is
            for Artifacts ("share/examples/gprbuild") use ("examples/*");
            for Artifacts ("nofile") use ("a/satrace.log"); <<== non existent file
   end Install; 

end Gprbuild;

3) gprinstall -p gprbuild.gpr

Either "smashing stack " or "Storage error/Segmentaion fault" will appear.

On exit from exception handler gprinstall binary copies SP from R3 register which contains garbage.

Comment 2 Pavel Zhukov 2019-02-21 19:39:02 UTC
addition: if gprbuild is compiled without Fedora flags it works fine.

Comment 3 Ben Cotton 2019-08-13 16:53:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 4 Ben Cotton 2019-08-13 19:13:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.


Note You need to log in before you can comment on or make changes to this bug.