[4.3 Regression] Wrong code when -O3 or -O2 -fstack-protector used

Bug #316019 reported by Matthias Klose
8
Affects Status Importance Assigned to Milestone
gcc
Fix Released
Medium
gcc-4.3 (Ubuntu)
Fix Released
High
Unassigned
Intrepid
Fix Released
High
Unassigned
Jaunty
Fix Released
High
Unassigned

Bug Description

Binary package hint: gcc-4.3

PR middle-end/38616

Changed in gcc:
status: Unknown → Confirmed
Matthias Klose (doko)
Changed in gcc-4.3:
importance: Undecided → Medium
status: New → In Progress
status: New → In Progress
Revision history for this message
Kees Cook (kees) wrote :

On 64bit, the truncation happens at byte 24 (32bit happens at 8). Does not happen on Gutsy or Hardy (or Dapper, which didn't use -fstack-protector).

I have no idea how to even search for stack variables that are assigned an initial string value. That's rather semantically sensitive to search for.

Revision history for this message
Kees Cook (kees) wrote :

More test cases...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.3 - 4.3.2-2ubuntu11

---------------
gcc-4.3 (4.3.2-2ubuntu11) jaunty; urgency=low

  * Fix PR middle-end/38616 (wrong code with -fstack-protector). LP: #316019.
  * Update to SVN 20090111 from the gcc-4_3-branch.
    - Fix PR target/34571, PR debug/7055, PR tree-optimization/37194,
      PR tree-optimization/38529, PR fortran/38763, PR fortran/38765.

 -- Matthias Klose <email address hidden> Mon, 12 Jan 2009 00:25:32 +0100

Changed in gcc-4.3:
status: In Progress → Fix Released
Changed in gcc:
status: Confirmed → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

not yet fixed.

Changed in gcc-4.3:
importance: Undecided → High
status: In Progress → Triaged
importance: Medium → High
status: Fix Released → Triaged
Revision history for this message
Kees Cook (kees) wrote :
Changed in gcc:
status: Fix Released → Unknown
Changed in gcc:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.3 - 4.3.2-2ubuntu14

---------------
gcc-4.3 (4.3.2-2ubuntu14) jaunty; urgency=low

  * Update to SVN 20090119 from the gcc-4_3-branch.
    - Fix PR tree-optimization/36765.
  * Remove patch for PR 34571, applied upstream.
  * Apply proposed patch for PR middle-end/38902. LP: #316019.

 -- Matthias Klose <email address hidden> Tue, 20 Jan 2009 00:06:35 +0100

Changed in gcc-4.3:
status: Triaged → Fix Released
Changed in gcc:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gcc-4.3:
status: Triaged → Fix Committed
Revision history for this message
Kees Cook (kees) wrote :

Confirmed to be fixed in Jaunty, confirmed to be fixed in Intrepid -proposed.

Changed in gcc:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.3 - 4.3.2-1ubuntu12

---------------
gcc-4.3 (4.3.2-1ubuntu12) intrepid-proposed; urgency=low

  * Fix PR middle-end/38616, PR target/38902 (wrong code with
    -fstack-protector). LP: #316019.

  * Fix PR target/38287 (sparc, wrong code). Closes: #506713.
  * Apply selected fixes from the gcc-4_3-branch:
    - Fix PR tree-optimization/37102 (wrong code).
    - Fix PR tree-optimization/37868 (wrong code).
    - Fix PR c++/38030 (wrong code).
    - Fix PR rtl-optimization/37489 (wrong code).
    - Fix PR middle-end/37882 (wrong code).
    - Fix PR tree-optimization/36765 (wrong code).

 -- Matthias Klose <email address hidden> Tue, 20 Jan 2009 01:14:32 +0100

Changed in gcc-4.3:
status: Fix Committed → Fix Released
Changed in gcc:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.