[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-cgicc] string problems
From: |
Alexander J. Oss |
Subject: |
Re: [help-cgicc] string problems |
Date: |
Sun, 2 Feb 2003 13:29:20 -0500 |
Vitaliy--
I didn't see anything in FormEntry.cpp called MakeString(), although there's
the method FormEntry::makeString(). You call it "undocumented", which is
reasonable since it's a private method. I would recommend you take a look
at that method, since the returned string does nothing out of the ordinary;
to build its return value, it creates a string with the default constructor
and then calls std::string::append() several times.
Might you have a buggy std::string implementation?
----- Original Message -----
From: "Vitaliy" <address@hidden>
To: <address@hidden>
Sent: Saturday, February 01, 2003 12:00 PM
Subject: [help-cgicc] string problems
Hello there,
I have some problems, when trying to work with FormEntry
When trying 2 post string value > 16 symbols form FORM to .cgi,
I have dlgheap.c ASSERTION, and then crash!
All because FormEntry, when receives characters from stdin
stream, creates sdt::string class's new instance (undocumented
MakeString()), where puts
that string!
After this it returns this std::string object (by value)!!!
In this moment std::string's copy constructor called.
This copy constructor copyes pointer (not characters)!!!
when std::string destructor runs... it tryes to free memory, by
having pointer, BUT! memory, pointed by him is in other
(cgicc library) heap! dbgheap.c ASSERTS that it cannot free
memory by this pointer. Pointer MUST come from LOCAL HEAP!!!
I hope that You will understand that I mean...
Best regards,
Vitaliy mailto:address@hidden
_______________________________________________
help-cgicc mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-cgicc