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-7756] [Ubuntu] [REPL] String interpolation error #50296

Closed
dan-zheng opened this issue May 23, 2018 · 1 comment
Closed

[SR-7756] [Ubuntu] [REPL] String interpolation error #50296

dan-zheng opened this issue May 23, 2018 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift for tensorflow

Comments

@dan-zheng
Copy link
Collaborator

Previous ID SR-7756
Radar None
Original Reporter @dan-zheng
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Swift for TensorFlow
Labels Bug
Assignee @dan-zheng
Priority Medium

md5: e024d02e6a673d8666c86b7319cc751a

Issue Description:

Simple string interpolation examples crash on Ubuntu in the REPL for some reason.

$ usr/bin/swift
Welcome to Swift version 4.2-dev (LLVM 04bdb56f3d, Clang b44dbbdf44, Swift aa19e11af7). Type :help for assistance.
 1> let amount = 3
amount: Int = 3
 2> let count = "I have \(amount) apples"
lldb: /home/swift-build/llvm/lib/IR/Value.cpp:404: void llvm::Value::doRAUW(llvm::Value *, bool): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.
Stack dump:
0. Running pass 'Function Pass Manager' on module 'lldb_module'.
1. Running pass 'Swift ARC contraction' on function '@"$SSS19stringInterpolationS2Sd_tcfCTf4gd_n"'
[1] 91105 abort (core dumped) usr/bin/swift

Replicated on Ubuntu 16.04 and 14.04. This might be caused because optimizations are enabled in the REPL. Merging from upstream may fix the issue.

@dan-zheng
Copy link
Collaborator Author

This bug was naturally fixed after downstreaming changes from master. Verified using the 6/29 toolchain for Ubuntu 16.04/14.04.

$ swift
Welcome to Swift version 4.2-dev (LLVM eb00ef6046, Clang d9545f2833, Swift a90195b5c7). Type :help for assistance.
  1> let amount = 3
amount: Int = 3
  2> let count = "I have \(amount) apples"
count: String = "I have 3 apples"

@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. swift for tensorflow
Projects
None yet
Development

No branches or pull requests

1 participant