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

occ -MD test.cpp crashed #905

Closed
ghost opened this issue Jul 10, 2023 · 8 comments
Closed

occ -MD test.cpp crashed #905

ghost opened this issue Jul 10, 2023 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 10, 2023

$ occ -MD test.cpp
occ (OrangeC) Version 6.0.70.2
Copyright (C) LADSoft 2006-2021
version: 6.0.70.2
Command Line: "C:\orangec\bin\occparse" -! --architecture "x86;lssm:uzorhoahkfygfpfgsevpg" "-MD" "test.cpp"

Access Violation:(C:\orangec\bin\occparse.exe)
CS:EIP 0023:0069D0AB  SS:ESP 002B:0018F7FC
EAX: 00000000  EBX: 0084CFB8  ECX: FFFFFFFF  EDX: 02490080  flags: 00010206
EBP: 0018FAD0  ESI: 0084CF70  EDI: 0018FD10
 DS:     002B   ES:     002B   FS:     0053   GS:     002B


CS:EIP  8B 40 04 8B 40 10 23 C0 0F 94 C0 83 E0 01 22 C0

Stack trace:
                        69d0ab
                        403911
                        5c67f7

test.cpp

#include <iostream>

int main() {
    std::cout << "Hello World!";
    return 0;
}
@ghost
Copy link
Author

ghost commented Jul 10, 2023

occ -MMD test.cpp also crashed:

$ occ -MMD test.cpp
occ (OrangeC) Version 6.0.70.2
Copyright (C) LADSoft 2006-2021
version: 6.0.70.2
Command Line: "C:\orangec\bin\occparse" -! --architecture "x86;lssm:dsalhpqhdjwwscgnrgkxi" "-MMD" "test.cpp"

Access Violation:(C:\orangec\bin\occparse.exe)
CS:EIP 0023:0069D0AB  SS:ESP 002B:0018F7FC
EAX: 00000000  EBX: 0084CFB8  ECX: FFFFFFFF  EDX: 02540080  flags: 00010206
EBP: 0018FAD0  ESI: 0084CF70  EDI: 0018FD10
 DS:     002B   ES:     002B   FS:     0053   GS:     002B


CS:EIP  8B 40 04 8B 40 10 23 C0 0F 94 C0 83 E0 01 22 C0

Stack trace:
                        69d0ab
                        403911
                        5c67f7

@LADSoft
Copy link
Owner

LADSoft commented Jul 10, 2023

ok thanks for the heads up... works when compiled with MSVC so I'll have to get out a debugger and debug the binary version, you can meanwhile use the one in the github action as it is compiled with MSVC and I'll get to fixing this soon...

@ghost
Copy link
Author

ghost commented Jul 11, 2023

@LADSoft @GitMensch @chuggafan

$ gdb --args occ -MD test.cpp
GNU gdb (GDB) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from occ...
(gdb) r
Starting program: C:\orangec\bin\occ.exe -MD test.cpp
occ (OrangeC) Version 6.0.70.2
Copyright (C) LADSoft 2006-2023
warning: Application "\??\C:\orangec\bin\occparse.exe" not found in cache
warning: Application "\??\C:\orangec\bin\occopt.exe" not found in cache
warning: Application "\??\C:\orangec\bin\olink.exe" not found in cache
Error: Input file 'c0xpe.o' does not exist.
Error: Library 'climp.l' does not exist or is not a library
Error: Library 'clwin.l' does not exist or is not a library
Error: Undefined External '_CatchCleanup(void*)' in module test.cpp
Error: Undefined External 'std::__basic_string_common<bool=1>::__basic_string_common()' in module test.cpp
Error: Undefined External 'std::__basic_string_common<bool=1>::~__basic_string_common()' in module test.cpp
Error: Undefined External 'std::basic_ostream<char, char_traits<char>>::sentry::sentry(basic_ostream<char, char_traits<char>>&)' in module test.cpp
Error: Undefined External 'std::basic_ostream<char, char_traits<char>>::sentry::~sentry()' in module test.cpp
Error: Undefined External 'std::basic_string<char, char_traits<char>, allocator<char>>::~basic_string()' in module test.cpp
Error: Undefined External 'std::basic_string<char, char_traits<char>, allocator<char>>::__init(unsigned int, char)' in module test.cpp
Error: Undefined External 'std::basic_string<char, char_traits<char>, allocator<char>>::__rep::__rep()' in module test.cpp
Error: Undefined External 'std::ctype<char>::id' in module test.cpp
Error: Undefined External 'std::cout' in module test.cpp
Error: Undefined External 'std::ios_base::__set_badbit_and_consider_rethrow()' in module test.cpp
Error: Undefined External 'std::ios_base::clear(unsigned int)' in module test.cpp
Error: Undefined External 'std::ios_base::getloc() const ' in module test.cpp
Error: Undefined External 'std::locale::~locale()' in module test.cpp
Error: Undefined External 'std::locale::use_facet(std::locale::id&) const ' in module test.cpp
Error: Undefined External '__cppexceptionhandle' in module test.cpp
Error: Undefined External 'strlen' in module test.cpp
        20 Errors, 0 Warnings
        Errors encountered, not creating output file
[Inferior 1 (process 3840) exited with code 01]
(gdb) l
1       C:/M/B/src/mingw-w64/mingw-w64-crt/misc/mbrtowc.c: No such file or directory.
(gdb)

It seems the version of Orange C built by me is not working:

$ occ test.cpp
occ (OrangeC) Version 6.0.70.2
Copyright (C) LADSoft 2006-2023
Error: Input file 'c0xpe.o' does not exist.
Error: Library 'climp.l' does not exist or is not a library
Error: Library 'clwin.l' does not exist or is not a library
Error: Undefined External '_CatchCleanup(void*)' in module test.cpp
Error: Undefined External 'std::__basic_string_common<bool=1>::__basic_string_common()' in module test.cpp
Error: Undefined External 'std::__basic_string_common<bool=1>::~__basic_string_common()' in module test.cpp
Error: Undefined External 'std::basic_ostream<char, char_traits<char>>::sentry::sentry(basic_ostream<char, char_traits<char>>&)' in module test.cpp
Error: Undefined External 'std::basic_ostream<char, char_traits<char>>::sentry::~sentry()' in module test.cpp
Error: Undefined External 'std::basic_string<char, char_traits<char>, allocator<char>>::~basic_string()' in module test.cpp
Error: Undefined External 'std::basic_string<char, char_traits<char>, allocator<char>>::__init(unsigned int, char)' in module test.cpp
Error: Undefined External 'std::basic_string<char, char_traits<char>, allocator<char>>::__rep::__rep()' in module test.cpp
Error: Undefined External 'std::ctype<char>::id' in module test.cpp
Error: Undefined External 'std::cout' in module test.cpp
Error: Undefined External 'std::ios_base::__set_badbit_and_consider_rethrow()' in module test.cpp
Error: Undefined External 'std::ios_base::clear(unsigned int)' in module test.cpp
Error: Undefined External 'std::ios_base::getloc() const ' in module test.cpp
Error: Undefined External 'std::locale::~locale()' in module test.cpp
Error: Undefined External 'std::locale::use_facet(std::locale::id&) const ' in module test.cpp
Error: Undefined External '__cppexceptionhandle' in module test.cpp
Error: Undefined External 'strlen' in module test.cpp
        20 Errors, 0 Warnings
        Errors encountered, not creating output file

@ghost ghost mentioned this issue Jul 11, 2023
@LADSoft
Copy link
Owner

LADSoft commented Jul 11, 2023

it works fine on windows, i'll try it on msys2 tonite...

@ghost
Copy link
Author

ghost commented Jul 11, 2023

@LADSoft MSVC THEN WITH LSCRTL

occparse.exe caused an Access Violation at location 0000000000666D68 in module occparse.exe Reading from location 0000000000000004.

Registers:
eax=00000000 ebx=007cf350 ecx=ffffffff edx=02bb6c80 esi=007cf308 edi=0018fd38
eip=00666d68 esp=0018f808 ebp=0018fae4 iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202

AddrPC   Params
00666D68 0018FD20 00000000 7FFDE000  occparse.exe!0x266d68
004037EC 00000006 02360088 02370088  occparse.exe!0x37ec
005B9ED1 7FFDE000 748F7BE0 664A0B7A  occparse.exe!0x1b9ed1
748F7C04 7FFDE000 64283BF8 00000000  KERNEL32.DLL!@BaseThreadInitThunk@12+0x24
76F1B90F FFFFFFFF 76F006E5 00000000  ntdll.dll!__RtlUserThreadStart+0x2f
76F1B8DA 00401000 7FFDE000 00000000  ntdll.dll!__RtlUserThreadStart@8+0x1b

@ghost
Copy link
Author

ghost commented Jul 18, 2023

@LADSoft New update: this crash only happens with the Orange C build from AppVeyor. The build from Github Actions works fine. As you said the build from AppVeyor is Orange C built with itself. Something is seriously wrong with Orange C.

@LADSoft LADSoft closed this as completed Jul 19, 2023
@ghost
Copy link
Author

ghost commented Jul 19, 2023

@LADSoft Why did you close this issue? Did you get it resolved?

@LADSoft
Copy link
Owner

LADSoft commented Jul 19, 2023

yes you will see the commit says 'fixes #905'. If the word 'fixes' is in there it means I've got it fixed and github then closes the issue as part of the commit. It is kind of a shortcut instead of having to do the commit and then come here to close it out.

@ghost ghost mentioned this issue Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant