Fix global symbol loading failure in resolve function
PATCH 1/1 Fix global symbol loading failure in resolve function
From: Brandon Hong <[email protected]>
270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc resolver resolve_half_to_float() tries to call unbound global function igt_x86_features(). This patch fixes the issue by adding a F16C checking local function.
--- lib/igt_halffloat.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-)
lib/igt_halffloat.c +29 -2
@@ -24,6 +24,19 @@#include <assert.h> #include <math.h> +#include <stdbool.h> + +#ifdef HAVE_CPUID_H +#include <cpuid.h> +#else +#define __get_cpuid_max (x, y) 0 +#define __cpuid (level, a, b, c, d) a = b = c = d = 0 +#define __cpuid_count (level, count, a, b, c, d) a = b = c = d = 0 +#endif + +#ifndef bit_F16C +#define bit_F16C (1 << 29) +#endif #include "igt_halffloat.h" #include "igt_x86.h"
@@ -182,6 +195,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)#pragma GCC pop_options +static bool f16c_is_supported (void ) +{ +unsigned max =__get_cpuid_max (0 ,NULL ); +unsigned eax, ebx, ecx, edx; + +if (max >=1 ) { +__cpuid (1 , eax, ebx, ecx, edx); + +if (ecx & bit_F16C) +return true; + } +return false; +} +static void float_to_half (const float *f,uint16_t *h,unsigned int num) {for (int i =0 ; i < num; i++)
@@ -196,7 +223,7 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)static void (*resolve_float_to_half (void ))(const float *f,uint16_t *h,unsigned int num) { -if (igt_x86_features () &F16C ) +if (f16c_is_supported ())return float_to_half_f16c;return float_to_half;
@@ -207,7 +234,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)static void (*resolve_half_to_float (void ))(const uint16_t *h,float *f,unsigned int num) { -if (igt_x86_features () &F16C ) +if (f16c_is_supported ())return half_to_float_f16c;return half_to_float;
Signature · 6 lines
2.23.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for Fix global symbol loading failure in resolve function (rev4)
== Series Details ==
== Series Details ==
Series: Fix global symbol loading failure in resolve function (rev4)
URL : https://patchwork.freedesktop.org/series/67150/
State : success
== Summary ==
CI Bug Log - changes from IGT_5207 -> IGTPW_3511
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/67150/revisions/4/mbox/
Known issues
------------
Here are the changes found in IGTPW_3511 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_flink_basic@basic:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/fi-icl-u3/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#111045] / [fdo#111096])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/fi-kbl-7500u/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_create@basic-files:
- fi-bxt-dsi: [INCOMPLETE][5] ([fdo#103927]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/fi-bxt-dsi/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/fi-bxt-dsi/igt@[email protected]
* igt@gem_ctx_switch@legacy-render:
- fi-icl-u2: [INCOMPLETE][7] ([fdo#107713] / [fdo#111381]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/fi-icl-u2/igt@[email protected]
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [INCOMPLETE][9] ([fdo#107718]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/fi-blb-e6850/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/fi-blb-e6850/igt@[email protected]
* igt@gem_workarounds@basic-read:
- fi-icl-u3: [DMESG-WARN][11] ([fdo#107724]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/fi-icl-u3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/fi-icl-u3/igt@[email protected]
* igt@i915_selftest@live_hangcheck:
- {fi-icl-guc}: [INCOMPLETE][13] ([fdo#107713] / [fdo#108569]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/fi-icl-guc/igt@i915_selftest@live_hangcheck.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/fi-icl-guc/igt@i915_selftest@live_hangcheck.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
[fdo#111833]: https://bugs.freedesktop.org/show_bug.cgi?id=111833
Participating hosts (52 -> 46)
------------------------------
Additional (2): fi-bdw-5557u fi-bwr-2160
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-skl-6770hq fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5207 -> IGTPW_3511
CI-20190529: 20190529
CI_DRM_6973: 7462c58bba0fb6e85bd380591c3fd86e298c0f95 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3511: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/index.html
IGT_5207: 9759822c53fa79b3758dd22cf1ac05b8832b29a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for Fix global symbol loading failure in resolve function (rev4)
In reply to [email protected]== Series Details ==
== Series Details ==
Series: Fix global symbol loading failure in resolve function (rev4)
URL : https://patchwork.freedesktop.org/series/67150/
State : success
== Summary ==
CI Bug Log - changes from IGT_5207_full -> IGTPW_3511_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/67150/revisions/4/mbox/
Known issues
------------
Here are the changes found in IGTPW_3511_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_switch@legacy-bsd2-heavy:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#109276]) +17 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb6/igt@[email protected]
* igt@gem_exec_schedule@pi-ringfull-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb1/igt@[email protected]
* igt@gem_tiled_swapping@non-threaded:
- shard-glk: [PASS][5] -> [DMESG-WARN][6] ([fdo#108686])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-glk2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-glk4/igt@[email protected]
* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-snb: [PASS][7] -> [SKIP][8] ([fdo#109271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-snb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-snb4/igt@[email protected]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
- shard-hsw: [PASS][9] -> [INCOMPLETE][10] ([fdo#103540])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-hsw2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-hsw5/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: [PASS][11] -> [FAIL][12] ([fdo#105767])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-hsw1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-hsw6/igt@[email protected]
* igt@kms_flip_tiling@flip-to-x-tiled:
- shard-iclb: [PASS][13] -> [FAIL][14] ([fdo#108134])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb6/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +4 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb6/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb4/igt@[email protected]
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][17] -> [SKIP][18] ([fdo#109441])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb3/igt@kms_psr@psr2_primary_page_flip.html
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +5 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-apl3/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-apl5/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [SKIP][21] ([fdo#110841]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb8/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [SKIP][23] ([fdo#109276]) -> [PASS][24] +23 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb3/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-chain-bsd:
- shard-iclb: [SKIP][25] ([fdo#111325]) -> [PASS][26] +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb6/igt@[email protected]
* {igt@i915_pm_dc@dc6-psr}:
- shard-iclb: [FAIL][27] ([fdo#110548]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb3/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb3/igt@[email protected]
* igt@i915_suspend@debugfs-reader:
- shard-apl: [DMESG-WARN][29] ([fdo#108566]) -> [PASS][30] +3 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-apl3/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-apl4/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-64x21-sliding:
- shard-apl: [FAIL][31] ([fdo#103232]) -> [PASS][32] +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-apl8/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-apl3/igt@[email protected]
- shard-kbl: [FAIL][33] ([fdo#103232]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-kbl7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-kbl3/igt@[email protected]
* igt@kms_cursor_legacy@short-flip-before-cursor-atomic-transitions-varying-size:
- shard-snb: [SKIP][35] ([fdo#109271]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-snb5/igt@kms_cursor_legacy@short-flip-before-cursor-atomic-transitions-varying-size.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-snb6/igt@kms_cursor_legacy@short-flip-before-cursor-atomic-transitions-varying-size.html
* igt@kms_flip@2x-flip-vs-suspend-interruptible:
- shard-hsw: [INCOMPLETE][37] ([fdo#103540]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-hsw2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-hsw1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend:
- shard-snb: [INCOMPLETE][39] ([fdo#105411]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-snb1/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-snb1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
- shard-iclb: [FAIL][41] ([fdo#103167]) -> [PASS][42] +4 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][43] ([fdo#109441]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb6/igt@kms_psr@psr2_cursor_render.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
#### Warnings ####
* igt@gem_mocs_settings@mocs-isolation-bsd2:
- shard-iclb: [FAIL][45] ([fdo#111330]) -> [SKIP][46] ([fdo#109276])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb1/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb5/igt@[email protected]
* igt@gem_mocs_settings@mocs-reset-bsd2:
- shard-iclb: [SKIP][47] ([fdo#109276]) -> [FAIL][48] ([fdo#111330])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-iclb6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-iclb4/igt@[email protected]
* igt@kms_vblank@pipe-c-wait-busy-hang:
- shard-snb: [SKIP][49] ([fdo#109271]) -> [SKIP][50] ([fdo#109271] / [fdo#109278])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5207/shard-snb5/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/shard-snb5/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#108134]: https://bugs.freedesktop.org/show_bug.cgi?id=108134
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_5207 -> IGTPW_3511
CI-20190529: 20190529
CI_DRM_6973: 7462c58bba0fb6e85bd380591c3fd86e298c0f95 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3511: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/index.html
IGT_5207: 9759822c53fa79b3758dd22cf1ac05b8832b29a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3511/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev