Fix crash when accessing base_exception error_context

Description

When accessing the base_exception error_context or error_info, a crash is possible when working with views. When building the ViewErrorContext a PyObject* is incorrectly DECREF'd which causes can lead to the crash.

NOTE: Earlier thought on believing PyDict_Copy only did a shallow copy was incorrect. PyDict_Copy will increment all the keys and values in the dict object when copying to a new dict object correctly. See CPython code.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

Jared Casey August 22, 2022 at 4:44 PM

Exception error_context fix so that crash does not occur.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created August 10, 2022 at 9:21 PM
Updated August 22, 2022 at 4:44 PM
Resolved August 22, 2022 at 4:44 PM
Instabug

Flag notifications