Skip to content

App crashes when building by vc++ compiler 19.33.31630 for x64 and the release build parameter -r but it works without -r #272

@forchid

Description

@forchid

Bug description

My simple app crashes when building by cl (vc++ compiler 19.33.31630 for x64) and the release build parameter -r, but it works without -r. And it is always ok if using gcc, clang or tcc with or without -r.

Code example

require 'string'

print('Start')
local s = string.format('%s', 'Hello!')
print('Over.')

Expected behavior

>nelua -b -o fmt --cc cl fmt.nelua
Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31630 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
fmt.c
Microsoft (R) Incremental Linker Version 14.33.31630.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:fmt.exe
/out:fmt.exe
fmt.obj

>fmt
Start
Over.

Workaround

Don't use the parameter -r of the program nelua

Environment

Provide relevant information about your environment:

  • Nelua version (you can check with nelua -v).

nelua -v
Nelua 0.2.0-dev
Build number: 0
Git date: unknown
Git hash: unknown
Semantic version: 0.2.0-dev.0+unknown
Copyright (C) 2019-2024 Eduardo Bart (https://nelua.io/)

  • Platform (e.g. Windows/MSYS2, Ubuntu Linux, MacOS)
    Windows
  • Architecture (e.g. x86_64, arm64)
    x86_64
  • C compiler if your bug has C compiler errors. (e.g. GCC 10.2, Clang 11)
    Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31630 for x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions