Bug 99992 - test/test-bezier.c dumps core on arm64/ppc/ppc64el
Summary: test/test-bezier.c dumps core on arm64/ppc/ppc64el
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-27 21:57 UTC by Timo Aaltonen
Modified: 2017-03-09 06:54 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
build log on ppc (149.02 KB, text/plain)
2017-02-27 21:57 UTC, Timo Aaltonen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Aaltonen 2017-02-27 21:57:15 UTC
Created attachment 129969 [details]
build log on ppc

Hi, 0.24.0 added a new test for wacom, but running it fails on (at least) these archs. Build log attached.
Comment 1 Peter Hutterer 2017-02-28 02:47:10 UTC
This appears to be a result of optimization. 

With -O0

Breakpoint 1, test_nonzero_x_linear () at test-bezier.c:157
157			assert(bezier[x] > bezier[x-1]);
(gdb) p bezier
$6 = {0 <repeats 409 times>, 1, 2, 4, 5, 7, 9, 10, 12, 14, 15, 17, 19, 21, 22, 

With -O2:
(gdb) p bezier
$1 = {0 <repeats 410 times>, 1, 3, 5, 7, 9, 10, 12, 14, 15, 17, 19, 20, 22,

That extra 0 at -O2 triggers the bug. There are other entries that don't match either, but only this one would trigger the bug.
Comment 2 Peter Hutterer 2017-02-28 05:31:53 UTC
https://patchwork.freedesktop.org/patch/141130/
Comment 3 Timo Aaltonen 2017-02-28 06:18:18 UTC
yep, that works, thanks
Comment 4 Peter Hutterer 2017-03-09 02:21:45 UTC
commit 72fb6d304eec6eeeac6b42963c2729134d56de57
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Feb 28 14:45:29 2017 +1000

    test: fix a test failure on ppc64(le) and aarch64


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.