Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1807872

Summary: capnproto test suite segfaults on ARM when compiled with default compiler flags with gcc10
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: capnprotoAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, avi.kivity, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, ngompa13, nickc
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: capnproto-0.7.0-6.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-16 20:38:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 245418, 1788297    

Description Neal Gompa 2020-02-27 12:11:34 UTC
Description of problem:
During the course of working on bug 1788297 and the affiliated upstream bug[1],
I discovered that capnproto's test suite only segfaults on ARM when I use the Fedora default compiler flags. If I compile with just "-g", everything passes.

Upstream has suggested this is a GCC bug, and I'm inclined to agree.

[1]: https://github.com/capnproto/capnproto/issues/937

Version-Release number of selected component (if applicable):
10.0.1-0.8.fc33

How reproducible:
Always

Steps to Reproduce:
1. fedpkg clone -a capnproto && cd capnproto
2. fedpkg scratch-build --arches armv7hl

Actual results:
Segfault while trying to run "table-test.c++:786: large tree table" test

Expected results:
All tests pass.

Additional info:
This is blocking resolving a FTBFS issue with capnproto.

Comment 1 Jakub Jelinek 2020-02-29 13:23:57 UTC
Tried building it on x86_64 with -O0 -g -fsanitize=undefined,address and it FAILs there too, e.g.
src/capnp/compiler/module-loader.c++:118:65: runtime error: signed integer overflow: 1535247712000000000 * 73 cannot be represented in type 'long int'
src/kj/array.h:466:14: runtime error: reference binding to misaligned address 0x7f9ca0e74dae for type 'const struct ArrayDisposer', which requires 8 byte alignment
src/kj/string.c++:190:25: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
src/kj/array.h:466:14: runtime error: reference binding to misaligned address 0x000000000002 for type 'const struct ArrayDisposer', which requires 8 byte alignment
0x000000000002: note: pointer points here
<memory cannot be printed>
(just a couple of different messages from src/capnp/compiler/capnp-test.sh.log).
Furthermore, lots of warnings like:
./src/kj/common.h:1267:23: warning: initializing ‘kj::ArrayPtr<const kj::ArrayPtr<const unsigned char> >::ptr’ from ‘std::initializer_list<kj::ArrayPtr<const unsigned char> >::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
So not really sure I want to spend too much time looking into it, because it is very likely just buggy package.

Comment 2 Jakub Jelinek 2020-03-02 16:05:57 UTC
As mentioned in https://github.com/capnproto/capnproto/issues/937 , this is a capnproto aliasing violation.

Comment 3 Fedora Update System 2020-03-12 13:23:40 UTC
FEDORA-2020-3e12574632 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3e12574632

Comment 4 Fedora Update System 2020-03-12 18:50:14 UTC
capnproto-0.7.0-6.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-3e12574632

Comment 5 Fedora Update System 2020-03-16 20:38:54 UTC
capnproto-0.7.0-6.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.