Running a g++ compiled program in AppContainer and throws 623 error RRS feed

  • Question

  • Hi, 

    I am trying to running a g++ complied program in AppContainer, but it throws a last error 623.

    MSDN explains this code as ERROR_ILLEGAL_DLL_RELOCATION

    {Illegal System DLL Relocation} The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL.

    I think the program running in AppContainer has no access to read the memory DLL, but the MSVC compiled program works fine.

    Requirement: sovle the 623 error.

    Reference: AppContainer github.com/MalwareTech/AppContainerSandboxg++version: MinGW 8.2.0-4

    MSVC version: 14.22.27905

    Windows SDK: 10.0.17134.0

    Thursday, September 5, 2019 11:04 AM

All replies

  • This is saying that another DLL has loaded into the location that a system DLL is meant to load at.

    Does the DLL built with MinGW have relocations enabled? Does it have ASLR/HEASLR enabled?

    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Thursday, September 5, 2019 11:19 AM
  • Hi Darran,

    I am very grateful that you replied to me, my program is the easiest to output a Hello World. Its works fine with directly using CreateProcess, but returned 623 error in the AppContainer.
    g++ didn't add extra compile directives, it is   g++ -g {source file} -o {target file}.exe

    Thank you!

    Thursday, September 5, 2019 1:33 PM
  • Hi,

    Could you please tell me what kind of the program you are running in AppContainer? Is it uwp?

    Best Regards,

    Jeanine Zhang

    Friday, September 6, 2019 2:12 AM
  • Hi Jeanine,

    The program running in AppContainer is a g++ compiled naive Win32 program, content is

    #include <iostream>
    using namespace std;
    int main()
        cout << "Hello world!\n";
        return 0;

    compile command is: g++ hello.cpp -g -o hello.exe


    Friday, September 6, 2019 3:31 AM
  • Hi,

    Sorry for delay in reply.

    Our forum is discussing about Visual C++ IDE, since your issue contains mingw , it is likely that it is beyond our support. so we suggest you could open a new thread in stackoverflow with c++, mingw, visual-studio tag for better support.

    Thank you for understanding.

    Best Regards,

    Jeanine Zhang

    Monday, September 9, 2019 7:27 AM