Search the web
Sign In
New User? Sign Up
pokersource · Poker Source
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
seg fault issue   Message List  
Reply | Forward Message #98 of 355 |
Re: [pokersource] seg fault issue


>
> Hey all I'm getting a segfault problem now. I tried to put in the
> eval.c sample into my app with some changes and it processes find but
> then the next call to the app it seg faults
>
[...]
> char *str;
> //QString *str;
> //str->append("bla");
> HandVal_toString(handval, str);

HandVal_toString assumes that there is already space backing its second
argument. If you 'str = malloc(REASONABLE_NUMBER);' or 'char str[SAME_IDEA];'
with the correct error checking in the first case all will be well.

[...]
> its something with HandVal_toString that is causing it to error. [...]
> If i just use HandVal_print() it works just fine.. I'm stumped here..

If you find the function which backs HandVal_print you will see it uses an
allocated (in that case on the stack) buffer when it calls HandVal_toString.

mph




Tue Aug 31, 2004 6:16 pm

muck_nutz
Offline Offline
Send Email Send Email

Forward
Message #98 of 355 |
Expand Messages Author Sort by Date

Hey all I'm getting a segfault problem now. I tried to put in the eval.c sample into my app with some changes and it processes find but then the next call to...
mzupan21
Offline Send Email
Aug 31, 2004
2:57 pm

... [...] ... HandVal_toString assumes that there is already space backing its second argument. If you 'str = malloc(REASONABLE_NUMBER);' or 'char...
Michael Hunter
muck_nutz
Offline Send Email
Aug 31, 2004
6:16 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help