Comments (2)
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...)
from ruby-pg.
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.
from ruby-pg.
Related Issues (20)
- How to build an old pg on ruby 2.3.1 HOT 1
- Segmentation fault with ruby 2.7.8 and pg 1.5.3 HOT 10
- Segmentation fault HOT 28
- Sonoma: getaddrinfo segmentation fault HOT 2
- Segmentation fault in ruby:3.2.2-alpine3.18 docker image HOT 2
- Wrong binary conversion on x86 (32bit intel) arch causing test failures HOT 4
- Bad IAM Token against Amazon Aurora Postgres: Out of memory error HOT 2
- Attempting to execute a sql file with `\set ...` raises errors HOT 3
- conn.exec writing "INFO" statements to stderr instead of stdout HOT 2
- Segfault on ruby 3.2.2, pg 1.5.4 HOT 2
- Error ruby(39749,0x1e1f05300) malloc: double free for ptr 0x13c6bfa00 HOT 1
- Segmentation fault when connecting to RDS HOT 11
- Broken links in documentation HOT 3
- connection.reset don't check again DNS HOT 6
- Usage with ApacheAGE for Postgresql HOT 2
- Add BigDecimal to gemspec for Ruby 3.3/4 HOT 2
- Binary Windows gem no longer available for Ruby v3.3 since v1.5.6 HOT 2
- Test failure with modified `RUBY_PG_TEST_DIR` HOT 2
- Q: Is it possible to handle composite values like `row(123, 'str', true)` ? HOT 1
- Dereference of null in alloc_query_params HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-pg.