Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 920183 Details for
Bug 1122448
invalid code generated by g++4.4.7-4
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
test case exposing problem
test.cpp (text/x-c++src), 1.75 KB, created by
Jakub Zytka
on 2014-07-23 09:57:54 UTC
(
hide
)
Description:
test case exposing problem
Filename:
MIME Type:
Creator:
Jakub Zytka
Created:
2014-07-23 09:57:54 UTC
Size:
1.75 KB
patch
obsolete
>#include <stdint.h> >#include <stdlib.h> > >static char buffer; > >enum >{ > ARRAY_SIZE = 8 >}; > >struct Array >{ > Array(); > > int64_t data[ARRAY_SIZE]; >}; > >Array::Array() >{ > for (uint32_t i = 0; i < ARRAY_SIZE; i++) > { > this->data[i] = 0; > } >} > >////////////////////////////////////////////////////////////// > >struct TripleArray >{ > TripleArray( > Array const & aa, > Array const & bb, > Array const & cc > ); > > virtual ~TripleArray() {}; > > Array a; > Array b; > Array c; >}; > >TripleArray::TripleArray( > Array const & aa, > Array const & bb, > Array const & cc >): > a(aa), > b(bb), > c(cc) >{ >} > >////////////////////////////////////////////////////////////// > >struct TripleArrayAndStuff: public TripleArray >{ > TripleArrayAndStuff( > int64_t const & xx, > int64_t const & yy, > Array const & aa, > Array const & bb, > Array const & cc > ); > > virtual ~TripleArrayAndStuff() {}; > > static TripleArrayAndStuff EmptyTripleArrayAndStuff(); > > int64_t x; > int64_t y; >}; > >__attribute__ ((noinline)) TripleArrayAndStuff::TripleArrayAndStuff( > int64_t const & xx, > int64_t const & yy, > Array const & aa, > Array const & bb, > Array const & cc >): > TripleArray( > aa, > bb, > cc > ), > x(xx), > y(yy) >{ >} > >TripleArrayAndStuff __attribute__ ((noinline)) TripleArrayAndStuff::EmptyTripleArrayAndStuff() >{ > return TripleArrayAndStuff(0, 0, Array(), Array(), Array()); >} > >//============================================================================ > >void test() >{ > { > TripleArrayAndStuff corruptingVar = TripleArrayAndStuff::EmptyTripleArrayAndStuff(); > } > > { >// __asm__ __volatile__("":::"memory"); > Array aa; > Array bb; > Array ccBeingCorrupted; > __asm__ __volatile__("":::"memory"); > buffer = ((0 == ccBeingCorrupted.data[0]) ? '=' : '!'); > if (buffer != '=') > { > ::abort(); > } > } >} > >int main() >{ > test(); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1122448
:
920180
|
920181
|
920182
| 920183 |
920184