Watch, Follow, &
Connect with Us
Public Report
Report From: Kylix/RTL/C++    [ Add a report in this area ]  
Report #:  3855   Status: Reported
Shared object with static libraries crash
Project:  Kylix Build #:  4186
Version:    3.0 Submitted By:   Petteri Heiskari
Report Type:  Basic functionality failure Date Reported:  3/20/2003 1:21:49 AM
Severity:    Commonly encountered problem Last Updated: 5/2/2003 12:58:35 PM
Platform:    Kylix C++ IDE Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
4.00 out of 5
Total Votes: None
Description
Shared object crashes when loaded into memory with dlopen.

No problem if option Use dynamic RTL/STL from Project/Options/Linker/ is selected.
Steps to Reproduce:
1. Create a shared object library not selecting Use dynamic RTL/STL.

2. Load it with dlopen (second parameter does not affect) :
void *pLib;
pLib = dlopen( sFileName, RTLD_NOW );

Call causes SIGSEGV and crashes the program. By using CPU debugger
I found that there seems to be a bug in static libraries. Segment
violation comes from function _BorUnwind_SetunhandledExceptionFilter. It
seems that it accesses data without relocating pointers or using register ebx as offset.
Workarounds
None
Attachment
None
Comments

Matthias Thoma at 3/20/2003 5:25:46 AM -
Known problem. See the readme: Section
"Cannot statically link CLX or RTL code into C(++) shared objects"

Petteri Heiskari at 3/24/2003 11:57:51 PM -
Ok, thank you for your comment.

Server Response from: ETNACODE01