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

Fix another IRBuilder InsertionPoint leak. #18991

Merged
merged 1 commit into from
Oct 18, 2016
Merged

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Oct 17, 2016

Similar to #18054. The builder used in gen_cfun_wrapper sets but doesn't clear its insertion point, which can get destroyed during finalization. When doing old = builder.GetInsertionPoint(); emit_whatever(); builder.SetInsertionPoint(old) later on, LLVM reads from that invalid memory.

Similar to #18054. Proper fix would be not to have a global builder.
@maleadt maleadt added backport pending 0.5 bugfix This change fixes an existing bug labels Oct 17, 2016
@tkelman
Copy link
Contributor

tkelman commented Oct 17, 2016

is this detected by existing tests when run in a sanitizer configuration?

@maleadt
Copy link
Member Author

maleadt commented Oct 17, 2016

Yes, I caught it in the ccall tests. Not always though, and I didn't figure out the exact interplay to figure out an good, exact test.

@maleadt
Copy link
Member Author

maleadt commented Oct 17, 2016

Uhh

Error During Test
  Test threw an exception of type Base.UVError

  Expression: wait(watch) == Base.Filesystem.FileEvent(false,false,true)
  start_watching (FileMonitor): no space left on device (ENOSPC)

Restarted CI.

@maleadt maleadt merged commit fd1ff3c into master Oct 18, 2016
@tkelman tkelman deleted the tb/builder_clear_ip_bis branch October 18, 2016 11:29
tkelman pushed a commit that referenced this pull request Feb 22, 2017
Similar to #18054. Proper fix would be not to have a global builder.

(cherry picked from commit 5eb07c4)
ref #18991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants