Bug 169843 - "short" accessed as a 32-bit word with -O1
Summary: "short" accessed as a 32-bit word with -O1
Keywords:
Status: CLOSED DUPLICATE of bug 169845
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc
Version: 3.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 169792
TreeView+ depends on / blocked
 
Reported: 2005-10-04 13:00 UTC by Miloslav Trmač
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-04 13:05:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Simplified reproducer (293 bytes, text/plain)
2005-10-04 13:00 UTC, Miloslav Trmač
no flags Details

Description Miloslav Trmač 2005-10-04 13:00:33 UTC
Description of problem:
The attached test case (derived from doset () in sh.set.c from tcsh)
should read "val = *ptr" using a 16-bit read, but it uses a 32-bit read.
When *ptr is located at end of a page, this can cause a SIGSEGV.

Version-Release number of selected component (if applicable):
gcc-3.2.3-53

How reproducible:
gcc -S -O1 foo2.c && less foo2.s

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Miloslav Trmač 2005-10-04 13:00:44 UTC
Created attachment 119593 [details]
Simplified reproducer

Comment 2 Miloslav Trmač 2005-10-04 13:05:28 UTC
Oops, sorry about the dupes.

*** This bug has been marked as a duplicate of 169845 ***


Note You need to log in before you can comment on or make changes to this bug.