Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix varargs use #63

Merged
merged 1 commit into from May 30, 2013
Merged

Fix varargs use #63

merged 1 commit into from May 30, 2013

Conversation

@rom1v
Copy link
Contributor

@rom1v rom1v commented May 29, 2013

forum thread

man stdarg says:

If ap is passed to a function that uses va_arg(ap,type) then the value
of ap is undefined after the return of that function.

va_start(…) and va_end(…) must be called at each iteration.

By chance, it worked in 32 bits, but it segfaulted in 64 bits.

See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31484

"man stdarg" says:
  If ap is passed to a function that uses va_arg(ap,type) then the value
  of ap is undefined after the return of that function.

va_start(…) and va_end(…) must be called at each iteration.

By chance, it worked in 32 bits, but it segfaulted in 64 bits.

See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31484
@ghost ghost assigned quixotique May 29, 2013
@lakeman lakeman merged commit f88dff0 into servalproject:development May 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants