Bug 169842

Summary: "short" accessed as a 32-bit word with -O1
Product: Red Hat Enterprise Linux 3 Reporter: Miloslav Trmač <mitr>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-04 13:05:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 169792    
Attachments:
Description Flags
Simplified reproducer none

Description Miloslav Trmač 2005-10-04 12:59:28 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:15 UTC
Created attachment 119592 [details]
Simplified reproducer

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

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