It seems the fix is to remove the virtual inheritance of AppenderSkeleton. I have opened a pull request <https://github.com/apache/logging-log4cxx/pull/629> to fix this.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free.www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Wed, Apr 15, 2026 at 5:13 PM Stephen Webb <[email protected]> wrote: > Hi Pravas, > > For reasons I do not currently understand, the compiler (I have reproduced > the crash using Visual Studio 2022 Debug mode) is calling the default > AppenderSkeleton constructor in the newInstance method generated by > the DECLARE_LOG4CXX_OBJECT macro. > > When the AsyncAppender constructor is called, the initialisation of > AppenderSkeletonPriv that AsyncAppender requires is skipped. > > The result is an AsyncAppender with the wrong type in m_priv member of > your SampleASyncAppender instance. > > Please let me know if you have any idea what would be causing this > compiler interpretation. > > Regards > Stephen Webb > > > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > Virus-free.www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > <#m_-5954524053528748597_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > On Wed, Apr 15, 2026 at 3:23 PM Pravas Ranjan Tripathy < > [email protected]> wrote: > >> Hi Team, >> I am experiencing a core dump when running a sample program with* >> log4cxx-1.7.0*. Interestingly, the same program runs successfully using >> *log4cxx-0.10.0*. >> I have attached the sample code (*sample_log4cxx.cpp*) and the >> configuration XML file(*Log4cxxConfig.xml*) for your review. >> >> *Environment Details:* >> OS: *Oracle Linux Server 8.8* >> GCC Version: *8.5.0 20210514 (Red Hat 8.5.0-18.0.2)* >> Compiler: *Intel(R) oneAPI DPC++/C++ Compiler 2025.2.1* >> Compilation Command: >> icpx -std=c++17 sample_log4cxx.cpp -I/opt/apache/log4cxx-1.7.0/include >> -L/opt/apache/log4cxx-1.7.0/lib -llog4cxx -lapr-1 -laprutil-1 -o >> sample_log4cxx >> >> Please let me know if there are any specific configurations I am missing >> or if you need additional debug logs (such as a GDB backtrace). >> Should I proceed with logging a formal defect on your GitHub Issues page( >> https://github.com/apache/logging-log4cxx/issues)? >> >> I appreciate your quick support on this matter. >> >> Best regards, >> Pravas >> >
