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-10528] Assertion Failure in MandatoryInliner #52928

Open
troughton opened this issue Apr 21, 2019 · 0 comments
Open

[SR-10528] Assertion Failure in MandatoryInliner #52928

troughton opened this issue Apr 21, 2019 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software SILOptimizer Area → compiler: SIL optimization passes

Comments

@troughton
Copy link
Contributor

Previous ID SR-10528
Radar rdar://problem/48755752
Original Reporter @troughton
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, SILOptimizer
Assignee None
Priority Medium

md5: 79abc15d12eac49dcf8243fc2b2de5ee

Issue Description:

In the attached sample project, building with an assertions-enabled toolchain will result in an assertion failure in MandatoryInliner.

The problem specifically arises in compiling the function:

public static func setup() {
        var functionPointers = CalcFunctionPointers(GetDeviceCount: getDeviceCount,
                             GetDeviceSpec: getDeviceSpec,
                             CreateDevice: createDevice,
                             DeleteDevice: deleteDevice,
                             DeviceCreateBuffer: createBuffer,
                             DeviceDeleteBuffer: deleteBuffer,
                             DeviceReadBuffer: deviceReadBuffer,
                             DeviceWriteBuffer: deviceWriteBuffer,
                             DeviceMapBuffer: deviceMapBuffer,
                             DeviceUnmapBuffer: deviceUnmapBuffer,
                             ExecutableCreateFunction: executableCreateFunction,
                             ExecutableDeleteFunction: executableDeleteFunction,
                             DeviceCompileExecutableSource: deviceCompileExecutableSource,
                             DeviceCompileExecutableBinary: deviceCompileExecutableBinary,
                             DeviceCompileExecutableFile: deviceCompileExecutableFile,
                             DeviceDeleteExecutable: deviceDeleteExecutable,
                             DeviceGetExecutableBinarySize: deviceGetExecutableBinarySize,
                             DeviceGetExecutableBinary: deviceGetExecutableBinary,
                             DeviceExecute: deviceExecute,
                             DeviceWaitForEvent: deviceWaitForEvent,
                             DeviceWaitForMultipleEvents: deviceWaitForMultipleEvents,
                             DeviceDeleteEvent: deviceDeleteEvent,
                             DeviceFlush: deviceFlush,
                             DeviceFinish: deviceFinish,
                             DeviceEventIsComplete: deviceEventIsComplete,
                             FunctionSetArg: functionSetArg,
                             FunctionSetBuffer: functionSetBuffer,
                             FunctionSetSharedMemory: functionSetSharedMemory)
        
        rrSetCalcFunctionPointers(&functionPointers)
    }

which sets a struct container a number of function pointers in a call to a C library.

The issue can be reproduced by running ./build_macos.sh in the directory of the unzipped attachment and then building the resulting Xcode project in release mode. The problem will occur when compiling RadeonRaysFrameGraph.swift in the LlamaCore module.

This is a reduced case of rdar://problem/48755752

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
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. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software SILOptimizer Area → compiler: SIL optimization passes
Projects
None yet
Development

No branches or pull requests

2 participants