Skip to content

Stack overflow (EXC_BAD_ACCESS) in cURL.swift #14

Open
@mfreed7

Description

@mfreed7

Hello, I'm getting a stack overflow that causes an EXC_BAD_ACCESS crash in cURL.swift. See the stack trace below. It seems like the recursive call back to innerComplete at this line should be added to an async queue or something, rather than being directly recursive?

This is on a Mac running Catalina 10.15.1 (19B88). The stack trace below comes from Perfect-CURL version 3.1.0, but I get this on any 3.x or 4.x version that I've tried. This happens typically when waiting for a CURL response from a slow server that takes a little while (~5-10 seconds) to respond.

Any help you can give me would be really appreciated.

...
#10 0x0000000100f945d8 in closure #2 in CURLResponse.innerComplete(:) at Perfect-CURL/Sources/PerfectCURL/CURLResponse.swift:206
#11 0x0000000100f9b3a5 in CURL.ioWait(
:) at Perfect-CURL/Sources/PerfectCURL/cURL.swift:222
#12 0x0000000100f942d7 in CURLResponse.innerComplete(:) at Perfect-CURL/Sources/PerfectCURL/CURLResponse.swift:205
#13 0x0000000100f945d8 in closure #2 in CURLResponse.innerComplete(
:) at Perfect-CURL/Sources/PerfectCURL/CURLResponse.swift:206
#14 0x0000000100f9b3a5 in CURL.ioWait(:) at Perfect-CURL/Sources/PerfectCURL/cURL.swift:222
...
#1298 0x0000000100f9b3a5 in CURL.ioWait(
:) at Perfect-CURL/Sources/PerfectCURL/cURL.swift:222
#1299 0x0000000100f942d7 in CURLResponse.innerComplete(:) at Perfect-CURL/Sources/PerfectCURL/CURLResponse.swift:205
#1300 0x0000000100f945d8 in closure #2 in CURLResponse.innerComplete(
:) at Perfect-CURL/Sources/PerfectCURL/CURLResponse.swift:206
#1301 0x0000000100f9bde7 in closure #1 in CURL.ioWait(_:) at Perfect-CURL/Sources/PerfectCURL/cURL.swift:241

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions