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-13880] Illegal Instruction in Swift compiler and interpreter #285

Open
swift-ci opened this issue Nov 19, 2020 · 3 comments
Open

[SR-13880] Illegal Instruction in Swift compiler and interpreter #285

swift-ci opened this issue Nov 19, 2020 · 3 comments
Assignees

Comments

@swift-ci
Copy link

Previous ID SR-13880
Radar rdar://problem/71677715
Original Reporter davidl2 (JIRA User)
Type Bug
Environment

"Docker version 17.05.0-ce, build 89658be", that is the "docker" Debian package, on Debian 10.3 64-bit, in a VM, under VirtualBox, on Windows 10.

$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 75
model name : AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
stepping : 2
cpu MHz : 2009.110
cache size : 512 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx fxsr_opt rdtscp lm 3dnowext 3dnow rep_good nopl cpuid extd_apicid tsc_known_freq pni x2apic hypervisor lahf_lm cr8_legacy 3dnowprefetch vmmcall
bugs : fxsave_leak sysret_ss_attrs null_seg swapgs_fence amd_e400 spectre_v1 spectre_v2
bogomips : 4018.22
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

Additional Detail from JIRA
Votes 0
Component/s Docker
Labels Bug
Assignee @shahmishal
Priority Medium

md5: 6602d3a77e4c96582dcb1802a18b4490

Issue Description:

Trying to run the first example in the Docker image's help page, I expect some sort of REPL loop, but instead I get a stack trace, and an "Illegal Instruction" return code...

$ docker run --cap-add sys_ptrace -it --rm swift swift
Stack dump:
{{0. Program arguments: swift }}
1. Swift version 5.3 (swift-5.3-RELEASE)
swift[0x51f95a4]
swift[0x51f719e]
swift[0x51f987c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7f7e098918a0]
swift[0x192a473]
swift[0x192349f]
swift[0x4e96d6]
swift[0x4e8a68]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f7e07edfb97]
swift[0x4e860a]

$ echo $?
132

@typesanitizer
Copy link

The integrated REPL has been removed, but we should print a nice diagnostic instead (and update the documentation as applicable). You can try compiling a hello world though, it should work.

@swift-ci create

@adrian-prantl
Copy link

theindigamer (JIRA User) how do I recognize that this is the integrated repl? It looks like they are invoking swift without any arguments, shouldn't that be equivalent to lldb --repl?

@typesanitizer
Copy link

Hmm, I think you're right, I made a mistake. I looked at crash plus calling swift with no arguments, so my mind jumped to integrated REPL which also had crashes at some point after it was removed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants