Bug 15667 - __FP_FRAC_ADD_3 shadowing variables in _FP_MUL_MEAT_2_wide_3mul
Summary: __FP_FRAC_ADD_3 shadowing variables in _FP_MUL_MEAT_2_wide_3mul
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: soft-fp (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-22 11:40 UTC by Joseph Myers
Modified: 2014-06-13 17:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Myers 2013-06-22 11:40:59 UTC
The soft-fp macro __FP_FRAC_ADD_3 defines variables _c1 and _c2.  The macro _FP_MUL_MEAT_2_wide_3mul defines its own variables with those names and calls __FP_FRAC_ADD_3 with arguments involving them, yielding erroneous results when the wrong variables get used.

(I don't think this actually affects the current uses of soft-fp in glibc on any architecture; it came up while testing a patch adding new uses.  But it seems appropriate to file this in Bugzilla anyway.)
Comment 1 Joseph Myers 2013-06-22 19:28:39 UTC
Fixed for 2.18 by:

commit 695c378f81263640618bdebf56eaa065f578251f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Jun 22 19:27:41 2013 +0000

    Fix soft-fp shadowing between __FP_FRAC_ADD_3 and _FP_MUL_MEAT_2_wide_3mul (bug 15667).