Skip to content

[frontend] Fix use-after-free issue found via ASAN #9335

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

Closed

Conversation

DougGregor
Copy link
Member

This was introduced via #9260

swift-ci and others added 30 commits February 20, 2017 21:58
…efault-bridging-pch-on-swift-3.1-branch

Revert "[Bridging PCH] Make -enable-bridging-pch the default."
cfe9e6a removed calls to pre/post
printing of PrintStructureKind::GenericRequirement, so SourceKit DocInfo
requests started droping the markers for generic requirements, causing
some weirdness with documentation rendering and post-processing.

Restore the calls to printStructPre/Post when printing generic
requirements.

rdar://problem/30561880
- Remove a test file that made its way in to the original commit.
- Don't need a newline forcing wrapper for printStructurePost

rdar://problem/30404063
…g-constraint-annotation-swift-3.1

[ASTPrinter] Restore printing generic requirement contexts
…bi_v7k_swift-3.1-branch

Fix IRGen abi_v7k test case
…uite.

This sets the NeededByPCHOrCompilationUsesPCH language option when
emitting a brigding PCH.

rdar://problem/30384801
ClangImporter: Adopt for clang change 2b4323722 and unbreak the testsuite.
…t_cases"

This reverts commit 8654428, reversing
changes made to 51795d3.
`URLError.Code` was missing 2 cases, and had 3 more cases implemented as
static properties that would crash when accessed.

Due to a limitation in the build process, we can't add availability
attributes for enum variants past macOS 10.9. This means 4 of the 5
cases are missing availability attributes that they should have.
[swift-3.1-branch][SDK] Turn URLError.Code back into an enum
…erns.

The `cmv.getValue() == value` check here seems fishy, since the downstream case block should always take ownership of the bound values. Now that `copy_value`s produce new defs, it's also never true when it would've been true using the `retain/release_value` model, leading us to fail to copy values when necessary.
…he testsuite."

This reverts commit 30ed291.
It shouldn't have been automerged to swift-4.0-branch in the first place.
[3.1] SILGen: Fix overrelease of pattern bindings shared from multiple patterns.
The inactive list may contain other disjunctions associated with bound
type variables. For now, make sure we recover the orphan directly to
fix the crash in SR-4056 / rdar://problem/30686926. Later, we can
treat these as orphans, too.

(cherry picked from commit 99a1396)
[3.1] [Constraint solver] Dont assume orphans are along in the inactive list.
…7-revert-default-bridging-pch-on-swift-3.1-branch

Renable "[Bridging PCH] Make -enable-bridging-pch the default.""
…izers.

Apply the same is-generic check to initializers that we apply to
functions when establishing basic override compatibility. This is a
simple optimization for master, but fixes a crasher for Swift 3.1.

Fixes SR-4059.

(cherry picked from commit f74763d)
[3.1] [Type checker] Teach `areOverrideCompatibleSimple()` to look at initializers
akyrtzi and others added 26 commits May 4, 2017 12:00
Migrates code that compiles fine in Swift 3 but breaks in Swift 4 due to
changes in how the typechecker handles tuple arguments.
…_fix_linkage_private_decls_wmo

[swift-4.0-branch] IRGen: Use link_once instead of external for private decls
…-fix-4.0

Referencing encoders should use parent codingPath
…lly-enforced-address-4.0

Fix IRGenSIL to always look through DynamicallyEnforcedAddress.
…bitPattern in literal cases that could be claimed as double values
Fixes a bug in large loadable types wherein only the callee type of Apply is changed
…ompile()

This permits continuing to use the diagnostic engine object from the instance.
Large loadable types pass: resolves a case wherein a tuple’s extracted type is a function signature
…s are disabled.

This commit disables runtime stack trace dumping via dladdr on Darwin when
asserts are disabled.

This stack trace dumping was added as a way to improve the ability to debug the
compiler for compiler developers. This is all well and good but having such a
feature always enabled prevents us from reducing the size of the swift standard
library by eliminating the swift nlist.

rdar://31372220
…_nsnumber

SE-0170 cherry pick for swift 4.0
…wift_wrappers.

When a swift_wrapper'd type is renamed from Swift 3 -> 4, we create a
typealias for it. We need to look through that typealias when
deserializing members of that type, e.g., global variables of the
swift_wrapper'd type.

(cherry picked from commit 5934a86)
…ed-4.0

[Clang importer] Look through typealiases when importing members of swift_wrappers
[strip -ST] Disable runtime stack trace dumping on Darwin when assert…
@DougGregor DougGregor added this to the Swift 4.0 milestone May 5, 2017
@DougGregor
Copy link
Member Author

ugh, wrong base branch

@DougGregor DougGregor closed this May 5, 2017
@DougGregor DougGregor deleted the freeContextAndSIL-asan-4.0 branch May 5, 2017 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.