You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a problem with the way PGconn parses connection arguments, reported via 'omarqureshi' on the [[irc://irc.freenode.net/#ruby-lang|#ruby-lang IRC channel]].
He posted a backtrace in [[https://gist.github.com/ed348fd1757c22164a58|a gist on Github]]:
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Here's my gdb backtrace for the zero-arg call:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000002000
0x00007fff822b1120 in strlen ()
(gdb) bt 10
#0 0x00007fff822b1120 in strlen ()
#1 0x000000010010fa0f in BSD_vfprintf (fp=0x7fff5fbfdc30, fmt0=<optimized>,
ap=0x7fff5fbfdca0) at vsnprintf.c:927
#2 0x000000010011002c in rb_enc_vsprintf (enc=0x0,
fmt=0x100552db0 "Expected connection info string, hash, or 7
separate arguments, got a %s.", ap=0x7fff5fbfdca0) at sprintf.c:1170
#3 0x00000001000477a4 in rb_raise (exc=4303972400, fmt=<optimized>)
at error.c:1471
#4 0x000000010054ab63 in parse_connect_args (argc=0, argv=0x100400038,
self=<optimized>) at pg.c:295
#5 0x000000010054b2d9 in pgconn_init (argc=<optimized>, argv=<optimized>,
self=4328694120) at pg.c:409
#6 0x000000010017d214 in vm_call0 (th=0x1003016b0, recv=<optimized>, id=456,
argc=0, argv=0x100400038, me=0x1003c5750) at vm_eval.c:79
#7 0x000000010018242e in rb_funcall2 (recv=4328694120, mid=<optimized>,
argc=0, argv=0x100400038) at vm_eval.c:235
#8 0x000000010009c263 in rb_class_new_instance (argc=0, argv=0x100400038,
klass=<optimized>) at object.c:1545
#9 0x0000000100187c03 in vm_call_cfunc [inlined] () at
/Users/ged/.rvm/src/ruby-1.9.2-p180/vm_insnhelper.c:402
(More stack frames follow...)
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Move connection-parameter parsing into Ruby, and make option-handling more
flexible. No longer segfaults on no-option, <7-option array, and other combinations
of arguments to ::connect and ::connect_start. Fixes #67.
Original report by Michael Granger (Bitbucket: ged, GitHub: ged).
There's a problem with the way PGconn parses connection arguments, reported via 'omarqureshi' on the [[irc://irc.freenode.net/#ruby-lang|#ruby-lang IRC channel]].
He posted a backtrace in [[https://gist.github.com/ed348fd1757c22164a58|a gist on Github]]:
The text was updated successfully, but these errors were encountered: