This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: Re: Core dumped just only with strcat!


This is a forwarded message
From: Dani P. <danielpa@wanadoo.es>
To: "Pavel Tsekov" <ptsekov@syntrex.com>
Date: Monday, February 18, 2002, 9:45:51 PM
Subject: Core dumped just only with strcat!

===8<==============Original message text===============
I've trying lots of things and after 1 day with it, I've achieved to work
part of the code. What I did? I just declared my array before a MYSQL_RES
variable. I had:

MYSQL_RES * result;
char petition[500];

And I changed to:

char petition[500];
MYSQL_RES * result;

And also I did all the string work before the mysql stuff (connection call,
query call,...). And, don't ask me why, it worked! (now it crashes in other
function, in a mysql_query call).

I have not a reasonable answer for this behaviour... I'm quite lost. I've
asked this same question to the mysql-win32 list, and it seems not to be a
mysql problem (according to this list).

I have attached the code (it's in mysql_procs.c, but I have attached all the
files involved-- In order to compile and run, you need Gtk-win32 library),
but you must pardon me because it has been written in Spanish and so,
variables and comments may bore you.  The problem I related you was among
the first lines of the code, but the last problem I told you was among the
last lines.

Finally, could I ask you for forward this message to the cygwin list? After
the answers which claim that the error could be caused by mysql, I
unsuscribed from cywgin list, and by now, I'm not suscribed (yet).

Thanks,

Dani P.


----- Original Message -----
From: Pavel Tsekov <ptsekov@syntrex.com>
To: Dani P. <danielpa@wanadoo.es>
Cc: <cygwin@cygwin.com>
Sent: Monday, February 18, 2002 9:57 AM
Subject: Re: Core dumped just only with strcat!


> Just tried it - it doesn't dump core here. Is this snippet taken
> from a larger source ? If so maybe it would be usefull to paste it
> all. Maybe the core happens somewhere else...
>
> Still you can try to debug this by yourself - compile with -g
> option and launch gdb. Then come back to the list if you suspect
> a bug in cygwin and not your code :)
>
> Dani P. wrote:
>
> > Sorry, in my last posting there's an error in the piece of code:
> >
> >
> >>char request[500];
> >>request[0]=3D'\0'; <------ "3D" should not be here
> >>strcat(request,"SELECT * FROM data");
> >>
> >
> > I meant that this piece of code dumps a core, not the last posting.
> >
> > Thanks,
> >
> > Dani
> >
> >
> > ----- Original Message -----
> > From: Dani P. <danielpa@wanadoo.es>
> > To: <cygwin@cygwin.com>
> > Sent: Saturday, February 16, 2002 10:57 AM
> > Subject: Core dumped just only with strcat!
> >
> >
> >
> >>I have installed recently cygwin in order to compile a piece of code
> >>which compiled an d worked fine in Linux, using Gtk and MySQL libraries.
> >>It compiles fine, but it dumps a core just only with a "strcat". I do
the
> >>following:
> >>
> >>char request[500];
> >>request[0]=3D'\0';
> >>strcat(request,"SELECT * FROM data");
> >>
> >>And in that last instruction, it dumps a core.
> >>
> >>Could you help me?
> >>
> >>Thanks,
> >>
> >>Dani P.
> >>
> >>
> >>--
> >>Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> >>Bug reporting:         http://cygwin.com/bugs.html
> >>Documentation:         http://cygwin.com/docs.html
> >>FAQ:                   http://cygwin.com/faq/
> >>
> >>
> >>
> >
> >
> > --
> > Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> > Bug reporting:         http://cygwin.com/bugs.html
> > Documentation:         http://cygwin.com/docs.html
> > FAQ:                   http://cygwin.com/faq/
> >
> >
> >
> >
>
>
>

===8<===========End of original message text===========

Attachment: gui.h
Description: Binary data

Attachment: gui.c
Description: Binary data

Attachment: mysql_procs.c
Description: Binary data

Attachment: mysql_procs.h
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]