Article View: comp.os.msdos.programmer
Article #458BC++ 3.0--general protection fault???
From: Paul C. Janzen
Date: Fri, 24 Jul 1992 05:22
Date: Fri, 24 Jul 1992 05:22
50 lines
2116 bytes
2116 bytes
I've had a heck of a time tracing this one down, but the following code
fragment totally trashes either the IDE or the command-line compiler.
Is an error message too much to ask for?
I'd appreciate it if one or two of you could see if you get the same
results I do. Also, if you can figure out something inherently wrong
with this code, let me know.
------
#include <\bc\classlib\include\strng.h>
class test {
public:
test(String &s1, String &s2):
sa(s1), sb(s2) {}
private:
String sa;
String sb;
};
test t1( "hi", "there"); // the compiler should construct 2 Strings on the fly
// to pass to test::test
int main(){}
------
And here's the screen after it finishes compiling and begins to link:
EXCEPTION 13:general protection fault at 0A7F:03C0 error code 4154
ax=4144,bx=003A,cx=0000,dx=4154,di=0010,si=0001
ds=05C7 limit=FFFF segment# 004C C:\BC\BIN\BC.EXE
es=19C7 limit=1107 segment#
cs=0A7F limit=103A segment# 00AF C:\BC\BIN\BC.EXE
ss=05C7 limit=FFFF segment# 004C C:\BC\BIN\BC.EXE
error code=4154 limit=INVL segment#
strike any key to continue
How annoying....This happens under both OS/2 and DOS, with all kinds
of memory settings. If you only have one String, it doesn't happen. If
you pass the whole String, instead of a reference, it doesn't happen.
Thanks for your help.
------------------------------------------------------------------------
Paul C. Janzen You can create your own opportunities this
ifai645@ccwf.cc.utexas.edu week. Blackmail a senior executive.
------------------------------------------------------------------------
Technical Details
Message-ID:
<76497@ut-emx.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!ut-emx!ccwf.cc.utexas.eduShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu From: ifai645@ccwf.cc.utexas.edu (Paul C. Janzen) Newsgroups: comp.os.msdos.programmer Subject: BC++ 3.0--general protection fault??? Message-ID: <76497@ut-emx.uucp> Date: 24 Jul 92 05:22:56 GMT Sender: news@ut-emx.uucp Organization: The University of Texas at Austin, Austin TX Lines: 50