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 826658 Details for
Bug 1032628
Symbol lookup in elf/dl-lookup.c results in returning wrong values
[?]
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.
Customer Test Case
Test-case-2.txt (text/plain), 1.10 KB, created by
Deepu K S
on 2013-11-20 13:55:32 UTC
(
hide
)
Description:
Customer Test Case
Filename:
MIME Type:
Creator:
Deepu K S
Created:
2013-11-20 13:55:32 UTC
Size:
1.10 KB
patch
obsolete
>Statement : There are a shared object and a main executable, both have references to the constant std::string::_Rep::_S_max_size. When I link the main executable against the shared object, the value becomes zero. If not, the value is correct. > >$ cat foo.cpp >#define private public > >#include <string> > >const size_t * foo() >{ > return &std::string::_Rep::_S_max_size; >} > >$ cat main.cpp >#define private public > >#include <iostream> >#include <string> > >const size_t * foo(); > >const size_t * max_size; > >int main() >{ > max_size = &std::string::_Rep::_S_max_size; > > std::cout << std::hex << *max_size << " @ " << max_size << '\n' > << *foo() << " @ " << foo() << " (libfoo)\n"; > return 0; >} > >$ make >g++ -O2 -fPIC -shared foo.cpp -o libfoo.so >g++ -O2 -L. -lfoo main.cpp > >$ LD_LIBRARY_PATH=. ./a.out >0 @ 0x601280 >0 @ 0x601280 (libfoo) > >$ g++ -O2 main-without-foo.cpp >$ LD_LIBRARY_PATH=. ./a.out >3ffffffffffffff9 @ 0x600dc0 > >After Applying the patch and building glibc, >$ ~/libc/lib/ld-linux-x86-64.so.2 --library-path .:/lib64:/usr/lib64 ./a.out >3ffffffffffffff9 @ 0x601280 >3ffffffffffffff9 @ 0x601280 (libfoo)
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 1032628
: 826658 |
826659