[PCBC-143] segfault during lcb handle-level error handler Created: 09/Nov/12  Updated: 11/Dec/12  Resolved: 15/Nov/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: None
Affects Version/s: 1.0.4, 1.1.0-dp5
Fix Version/s: 1.1.0
Security Level: Public

Type: Bug Priority: Blocker
Reporter: Mark Nunberg Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
depends on CCBC-120 Unhandled opcode=92 Closed

This is related to CCBC-120 (stack trace there). Will fix accordingly soon.

Basically the error handler checks for the 'ctx' which is not reset in-between calls.

The ideal solution should be for start_loop to accept a cookie argument and call lcb_set_cookie on it. This way there is always a valid cookie.

Otherwise the cookie remains a stale pointer and when the global error handler is called, it crashes.

Comment by Mark Nunberg [ 12/Nov/12 ]
Generated at Sat Sep 20 13:26:26 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.