No warning and a seg fault when incorrectly using pragma effect on a constructor to affect the object itself
|
|
Bugzilla Link |
457 |
Created on |
Oct 14, 2008 17:59 |
Resolution |
FIXED |
Resolved on |
Feb 23, 2009 20:00 |
Version |
1.00beta |
OS |
Linux |
Architecture |
PC |
Attachments |
GnuPlot.sac |
Extended Description
Created an attachment (id=495)
A class with a constructor that calls itself
Incorrect code of the following form
external Class Constructor( );
#pragma effect Class::Object
#pragma linkobj "class.o"
causes an infinite loop since the "pragma effect" causes the constructor to recursively call itself. The compiler not only doesn't warn about this: it seg faults when it presumably runs out of memory.