swift icon indicating copy to clipboard operation
swift copied to clipboard

[SR-3421] master-next: DebugInfo/top_level_code.swift test fails

Open bob-wilson opened this issue 9 years ago • 4 comments

Previous ID SR-3421
Radar rdar://problem/29670172
Original Reporter @bob-wilson
Type Bug
Status Resolved
Resolution Done

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @adrian-prantl
Priority Medium

md5: 5eae6c3aa66075dba694f6510c22040e

Issue Description:

With the latest master-next merge, the DebugInfo/top_level_code.swift test is failing (https://ci.swift.org/view/swift-master-next/job/oss-swift-incremental-RA-osx-master-next/):

                                        • TEST 'Swift(macosx-x86_64) :: DebugInfo/top_level_code.swift' FAILED ********************

Script:

/Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/buildbot_incremental/swift-macosx-x86_64/bin/swiftc -frontend -target x86_64-apple-macosx10.9 -module-cache-path '/var/folders/_8/79jmzf2142z2xydc_01btlx00000gn/T/swift-testsuite-clang-module-cacheOQHbrr' -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -swift-version 3 /Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/swift/test/DebugInfo/top_level_code.swift -S -g -o - | /Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/swift/utils/PathSanitizingFileCheck --sanitize 'BUILD_DIR=/Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/buildbot_incremental/swift-macosx-x86_64' --sanitize 'SOURCE_DIR=/Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/swift' --use-filecheck '/Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/buildbot_incremental/llvm-macosx-x86_64/./bin/FileCheck' /Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/swift/test/DebugInfo/top_level_code.swift

Exit Code: 1

Command Output (stderr):

/Users/buildnode/jenkins/workspace/oss-swift-incremental-RA-osx-master-next/swift/test/DebugInfo/top_level_code.swift:14:11: error: expected string not found in input

// CHECK: .loc [0-9] 6 [0-9]
^
<stdin>:88:2: note: scanning from here
movq %rdi, -16(%rbp)
^
<stdin>:90:2: note: possible intended match here
.loc 1 5 27
^

--

********************

bob-wilson avatar Dec 14 '16 18:12 bob-wilson

I temporarily disabled the test until this is fixed.
To github.com:apple/swift.git
d907a18..f1b1cae master-next -> master-next

bob-wilson avatar Dec 14 '16 19:12 bob-wilson

@swift-ci create

bob-wilson avatar Dec 14 '16 22:12 bob-wilson

Using llvmlab bisect I was able to bisect this down to:

commit 9799671d21a11650fb0bea879776576a66bf2745
Author: Paul Robinson <[email protected]>
Date: Mon Dec 12 20:49:11 2016 +0000

Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions.

DWARF specifies that "line 0" really means "no appropriate source
location" in the line table. By default, use this for branch targets
and some other cases that have no specified source location, to
prevent inheriting unfortunate line numbers from physically preceding
instructions (which might be from completely unrelated source).

Updated patch allows enabling or suppressing this behavior for all
unspecified source locations.

Differential Revision: http://reviews.llvm.org/D24180

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289468

adrian-prantl avatar Dec 16 '16 18:12 adrian-prantl

Paul fixed the bug in LLVM and I cherry-picked the patch to master-next and re-enabled the testcase.

adrian-prantl avatar Dec 17 '16 21:12 adrian-prantl