Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-1177] Getting value from Dictionary crashes when built with -Onone #43785

Closed
swift-ci opened this issue Apr 7, 2016 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. non-optimized only Flag: An issue whose reproduction requires non-optimized compilation standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 7, 2016

Previous ID SR-1177
Radar None
Original Reporter wczekalski (JIRA User)
Type Bug
Status Resolved
Resolution Invalid

Attachment: Download

Environment

Apple Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3d) (03/01/2016 development snapshot)

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, NotOptimizedOnly
Assignee None
Priority Medium

md5: 9ab249de5a5e7ae6894b3afdf799732d

Issue Description:

When I get a value from a Dictionary it crashes. The crash happens in various places in the call stack of the subscript getter. It happens only if the build is compiled without Swift compiler optimizations on biggish data sets (tested with 10000 elements). It is probably generics related. I attached a sample program.

@belkadan
Copy link
Contributor

belkadan commented Apr 7, 2016

Starting on the standard library, cc @gribozavr

@gribozavr
Copy link
Collaborator

You're running out of stack space, crashing on the call instruction. There are more than 8 thousand frames in the stack trace.

(lldb) r
There is a running process, kill it and restart?: [Y/n] y
Process 84844 exited with status = 9 (0x00000009)
Process 84851 launched: './main' (x86_64)
Process 84851 stopped
* thread #​1: tid = 0x38a04b, 0x00000001000aada3 libswiftCore.dylib`Swift._VariantSetStorage.isUniquelyReferenced () -> Swift.Bool + 35, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3ffff8)
    frame #​0: 0x00000001000aada3 libswiftCore.dylib`Swift._VariantSetStorage.isUniquelyReferenced () -> Swift.Bool + 35
libswiftCore.dylib`Swift._VariantSetStorage.isUniquelyReferenced () -> Swift.Bool:
->  0x1000aada3 <+35>: callq  0x10020b46c               ; symbol stub for: object_getClass

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. non-optimized only Flag: An issue whose reproduction requires non-optimized compilation standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

3 participants