-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Net Exception: Address family not supported with clang #1950
Comments
@Bjoe that's with 1.7.9, right? |
@Bjoe I can't reproduce it, tried with clang 3.8 debug build. Somehow, there seems to be a compile-time mixup and AutoPtr ends up being mixed with SOO mode, then you have class inheriting from RefCountedObject, and the first data member is _counter. That's the only explanation I have for that behavior. There was an unrelated problem with MSVC precompiled headers and inlining of some IPAddress functions, fixed recently in develop. Can you try similar fix with SocketAddress and see if it fixes the problem (even better, try to understand why it happens, I can't reproduce and don't see it from reading code). thanks for your help. |
Add workaround for clang, move inline functions from header to source file
@aleks-f Sorry for the late answer. I try to create a bug report to clang. I try to create a small snippet for the bug report but it is not easy to reproduce this bug :-(.
Yes, sorry I forgott some infos.
I also thinking about this. When is the define POCO_HAVE_ALIGNMENT set?
Yes, that is what I mean with
See also my pull request. I tested on: @aleks-f On which platftorm you test this? Can you try following: Use poco from my github repo: Use branch: stack_address_issue git checkout dcbc92e2e3d71a58180d24343023108a530aac44 Build poco: poco/configure --omit=Data,NetSSL,Zip,XML,JSON,CppParser,Crypto,MongoDB,PDF,Util --prefix=/opt/poco-1.7.9 --no-samples --no-tests Edit config.make. Change POCO_CONFIG = Linux to POCO_CONFIG = Linux-clang or use cmake build system: execute: make install Compile this code:
with: clang++ -I/opt/poco-1.7.9/include -std=c++1y -MD -MT main.cpp.o -MF main.cpp.o.d -o main.cpp.o -c main.cpp execute test-debug: Now you should get the weird bug. Build with -Ox here with -O1 RefCountedObject::RefCountedObject Stack address from _counter: 0xb86fc8 all is fine. Build without -std=c++XX and withouth -Ox: clang++-3.8 -I/opt/poco-1.7.9/include -MD -MT main.cpp.o -MF main.cpp.o.d -o main.cpp.o -c main.cpp is also fine. For me it looks like it is a clang compiler bug. Should I post this to clang bug report? Maybe I meet somebody from clang project on the "Meeting C++" conference in Berlin :-) |
It is set here. The intent was to use the custom alignment code on pre-c++11 compilers, but as it is now, it will not come automatically into effect unless c++11 mode is enabled (ie. default c++11 build will use standard alignment code).
If you can create a simple example reproducing it, sure. One way or the other, I'd un-inline all the related functions in SocketAddress and IPAddress to prevent it from happening. I'm busy with other things at the moment, may come to it later. I could not reproduce with:
|
Ok. I was expected that I can choose if I will have POCO_HAVE_ALIGNMENT via a parameter on configure or cmake. I wonder what happens with following scenarios: When POCO library is building with C++11 parameter. POCO_HAVE_ALIGNMENT is activated and after the preprocessor the header of SocketAddress.h and SocketAddressImpl.h looks like: SocketAddress.h
SocketAddressImpl.h
Now I build my project that uses POCO withouth C++11 parameter. POCO_HAVE_ALIGNMENT is not activated and after the preprocessor the header of SocketAddress.h and SocketAddressImpl.h looks like: SocketAddress.h
SocketAddressImpl.h
Ok, newIPv4() functions are private and is only accessible via SocketAddress. So this function is compiled into the library and should never compiled in my project (Hopefully nobody will create this function public). But what is with SocketAddressImpl? With POCO_HAVE_ALIGNMENT, SocketAddressImpl is not inherited from RefCountedObject. Without POCO_HAVE_ALIGNMENT, SocketAddressImpl is inherited from RefCountedObject. From my example project, the compiler thinks that in Poco library SocketAddressImpl is inherited from RefCountedObject, but it is not. This mismatch affects only IPv4SocketAddressImpl::addr() because this function is compiled in my project. The constructor of IPv4SocketAddressImpl is compiled in the library. BtW, POCO_HAVE_ALIGNMENT is not only depended on the c++11 compiler parameter. In Alignment.h there check which compiler is used. For example, if clang is used as compiler and they have the cxx_alignas feature, POCO_HAVE_ALIGNMENT is also set. I wonder, how I know as a "library user" which implementation/parameter is used when I install POCO via the package manager of the OS? For example we have this issue with #1684. I know that FreeBSD is using as default compiler, clang in the build system. I don't know if Dian8 is using gcc as a default compiler, because it is possible on FreeBSD to change this localy. It looks like the ABI of POCO libray is depended on POCO_HAVE_ALIGNMENT.
Some other ideas ? Comments ? |
@Bjoe This feature has caused more trouble than benefit; I'd say, let's make things clean and simple - get rid of all SOO for IPAddress and SocketAddress altogether for 1.8.0. And un-inline anything that may cause problems. 2.0 is c++11 and alignment availability is guaranteed by standard, so the *Impl RefCountedObject inheritance can be removed and only SOO version used. I'll clean up develop for 2.0 |
an alternative for 1.8: have SOO and no-SOO, but for no-SOO version remove inheriting from RefCountedObject and move reference counting functionality directly into *Impl classes (not much work) and un-inline everything, so these classes look always the same to the users, regardless of an application compile-time flags |
Full Ack! 👍
👍
That's also an alternative.
That's what I mean with: Move all dependend POCO_HAVE_ALIGNMENT "in source" files to "hide the implementation". Or, let developer decide if he will have POCO_HAVE_ALIGNMENT or not via a parameter at the build system. Default is off so that POCO is compiled on every Linux/Unix OS'es without POCO_HAVE_ALIGNMENT and POCO works with every compiler. Let me know which solution we will choose. I will help you. Btw. should I close my merge request #1959 ? |
Sorry, by accident I pressed wrong button ... |
Let's remove SOO for both IPAddress and SocketAddress in 1.8
Either (a) close and create a new one, or (b) modify it in accordance with the above. I'll take care of develop. |
@Bjoe I'm ok with it, requested review from @obiltschnig; he is working on 1.8 release and we did not yet hear from him about this issue |
* Workaround bug in SolarisStudio 12.4 on RVO-ed objects. * HttpClientSession set specific proxysettings for attached socket If we have a global proxy settings and we attach an external socket to the HTTPClientSession there's no way to use different proxy settings for that connection. For example if you do not need for that connection httpproxy because is already attached to the correct and point * Fix ".. has no member named ... compile error" (#1938) * Fix ".. has no member named ... compile error" by renaming apache conn_rec attributes - conn_rec attributes remote_ip and remote_addr were replaced by client_ip and client_addr once they have been renamed in Apache 2.4 - a server_rec pointer must be passed to ap_log_error() since apache 2.4, therefore, a change was necessary at the ap_log_error log function. A null pointer has been passed for avoiding deeper changes at the function. - the smart pointer auto_ptr was replaced by unique_ptr once it was made deprecated in C++11 standard, it has been replaced by unique_ptr. * Add the properly #ifdef directives for backward compatibility purposes - Adding proper #ifdef preprocessor directives to keeping backward compatibility with older apache versions. * Update ApacheConnector.cpp * Add Gradle build.scripts Signed-off-by: zosrothko <zosrothko@orange.fr> * New files Signed-off-by: zosrothko <zosrothko@orange.fr> * Add distrib directory Signed-off-by: zosrothko <zosrothko@orange.fr> * Add PostgreSQL. Remove POCO_NO_WSTRING Signed-off-by: zosrothko <zosrothko@orange.fr> * CYgwin: remove -DPOCO_NO_WSTRING & build Data/PostgreSQL (#1942) * Upgrade to mysql-5.7.19-win32 (#1944) * fix -Woverloaded-virtual * remove return * SyntaxException for DateTimeParser::parse not working #569 * remove leftover comment * fix some warnings * purge trailing whitespace (#1947) * add Poco::makeUnique() * NTP Packet impl not according to RFC958? #749 * Poco::Data ODBC impl doesn't bind to unsigned numeric types properly #1683 * Remove useless windows commands (#1948) * Remove useless Windows commands * Generate build_cmd only for VS140 & VS150 * Display target configuration * Upgrade to mysql-5.7.19 (#1951) * Travis & AppVeyor: Unbind PDF module (#1953) * Unbind PDF * Upgrade to mysql-5.7.19 * Put Cygwin ahead * Add --omit=PDF * Display target configuration (#1952) * #1878 Add OrangePi on Build Support (#1949) - Created the configuration `OrangePi`, based on ARM-Linux, with fine tune for OrangePi - I tested using Poco samples on OrangePi Zero Signed-off-by: Uilian Ries <uilianries@gmail.com> * fix mysql odbc tests * Renamed directory distrib to packaging Signed-off-by: zosrothko <zosrothko@orange.fr> * Update .gradle/ * Restore lost changes by git Signed-off-by: zosrothko <zosrothko@orange.fr> * Update openssl path Signed-off-by: zosrothko <zosrothko@orange.fr> * Comment out displaying the compiler log * Create issue_template.md * Compile all C source as C++ source * Add gradle submodule Signed-off-by: zosrothko <zosrothko@orange.fr> * Remove /TP for compiling C code Signed-off-by: zosrothko <zosrothko@orange.fr> * Reinsert SemiStaticLibrary build Signed-off-by: zosrothko <zosrothko@orange.fr> * Fixed invalid merge Signed-off-by: zosrothko <zosrothko@orange.fr> * Missing files Signed-off-by: zosrothko <zosrothko@orange.fr> * Oracle ODBC fixes * restore deleted documentation * wrong field size calculation in ODBC code #1659; other max size excession checks and testcase * Rebuild PocoDoc Signed-off-by: zosrothko <zosrothko@orange.fr> * Remove deleted includes Signed-off-by: zosrothko <zosrothko@orange.fr> * Align with develop branch * Add task pocoTasks and dependency with nuget & candle * some fixes (mostly unicode/bulk) * #264, #1684, #1950 * Buffer<> swap miss ownMem #1964 * speling fix * speling fix * make uninstall does not remove .so symlinks #1017 * add uninstall to phony * Base64Encoder/Decoder: added support for 'base64url' encoding * removed $ tags * remove remaining $Id$ tags from file headers * Fix/tcp dispatcher (#1965) * TCPServerDispatcher::run() issue #1884; make integral members atomic and minimize locking * Update TCPServerDispatcher.cpp * fix test * fix test with gcc * fixed GH #1934: File::setExecutable() on POSIX should set executable bit for group and other if corresponding readable bit is set * Implement MailMessage::decode #1543 (wip) * added PollSet class * updated VS project files for PollSet * PollSet: on Windows, use WSAPoll if available * GH #1412: added Poco::DigestEngine::constantTimeEquals() * - fix Zip Decompress Parent Path Injection #1968 bug - add valid patch check test - add vulnearbility triggering zip archive and test - remove temporary test output files - if possible, redirect temporary file generation to temp directory or - delete temporary files after tests * fix relative path check, eliminate unused warnings * minor fixes * minor fixes * Implement MailMessage::decode #1543 (wip 2) * fix warning * only convert encoded-word if explicitly requested * Add kit version 10 for message compiler (#1978) * Restore _ostr(std::cout) to avoid timeouts on AppVeyor (#1980) * additional fix for GH #1212: WebSocketImpl::available() now reports number of bytes in internal buffer. * fixed GH #1828: DeflatingStreamBuf::sync() should also flush underlying stream. * Implement MailMessage::decode #1543 (tentatively done); add encode 'B', decode 'Q' and 'B' * TextEncodingRegistry documentation * merged connection string URI support from 1.8 * fixed GH #1425: Workaround bug in SolarisStudio 12.4 on RVO-ed objects. * Remove Cygwin build (#1985) * fixed GH #1404: Add Poco::Data::Statement::bind() method * GH #1988: Remove OpenVMS support * replace strerror() with Poco::Error::getMessage() * replace strerror() with Poco::Error::getMessage() * upgraded bundled SQLite to 3.21.0 * Fix writing into closed socket from streambuf In case of error occured in writeToDevice pptr may become one byte farther than epptr. This can lead to crash in streambuf::xsputn from libstdc++. * CMake patches for FreeBSD (#1989) * Switch FreeBSD to poll * Link against dl and rt on FreeBSD * pd_json strerror deprecation warning on Windows #1984 * revert #1828 * Backport from poco-1.8.0 Signed-off-by: zosrothko <zosrothko@orange.fr> * Add coverage directory Signed-off-by: zosrothko <zosrothko@orange.fr> * Backport from poco-1.8.0 Signed-off-by: zosrothko <zosrothko@orange.fr> * Add coverage task & tools Signed-off-by: zosrothko <zosrothko@orange.fr> * Removed Signed-off-by: zosrothko <zosrothko@orange.fr> * Backport from poco-1.8.0 Signed-off-by: zosrothko <zosrothko@orange.fr> * Added Signed-off-by: zosrothko <zosrothko@orange.fr> * Add OpenCppCoverage & ReportGenerator tasks Signed-off-by: zosrothko <zosrothko@orange.fr> * Add CPPUNIT_IGNORE variable Signed-off-by: zosrothko <zosrothko@orange.fr> * style fix * updated README.md * Add mechanism to start a task from within a task (#1287) * Add mechanism to start a task from within a task Staying in the same thread. * Provide seeds for a task queue creation TaskManager::taskFinished removes the finished task from the task list before dispatching the taskFinished notification * fixup! Add mechanism to start a task from within a task * fixup! Add mechanism to start a task from within a task * Add Task::yield on the same model as Task::sleep * implement Poco::SharedPtr using std::shared_ptr (#1993) * added additional move constructor and assignment operators * Fix building XMLStreamParser with unbundled expat * Add Directory for coverage task * Remove Cygwin build that exceeds 2 hours and reaches the timeout * WiX Poco wxs should not port the Poco version * Harden RecursiveDirectoryIterator when walking the filesystem. (#2001) * In the implementation for the *Traverse strategies the next method performs an unguarded list directory. If the directory is not accessible an unrecoverable error is raised thus ruining the walk. This changeset adopts and adapts the error handling protocol as defined in Python's os.walk function where errors from listdir are ignored or are reported to an optional on error callback function. * Expand DirectoryIteratorsTest testsuite to confirm the hardened iterator behaviour over unreadable directories. * Expand DirectoryIteratorsTest testsuite to confirm the hardened iterator behaviour over unreadable directories. Correct bad formatting * fix clang compile * SharePtr fix for gcc 7.2 (#2004) * Fix EVPTest on RHEL/Fedora by removing hard-coded EC curve name (#2002) RHEL/Fedora seem to have a much more limited set of EC curves available by default. This change will instead use the first curve name as used in other places. * Parallel C++ compiler jobs limited to 2 * Add missing '\'' * Removed * Cleanup * Cleanup Signed-off-by: zosrothko <zosrothko@orange.fr> * Remove removed XXXX_WIN32.h includes Signed-off-by: zosrothko <zosrothko@orange.fr> * Update for VisualStudio 2017 Signed-off-by: zosrothko <zosrothko@orange.fr> * Add debug log Signed-off-by: zosrothko <zosrothko@orange.fr> * Refactoring Signed-off-by: zosrothko <zosrothko@orange.fr> * dos2unix Signed-off-by: zosrothko <zosrothko@orange.fr> * SQLToMongoDB does not build * Merge Signed-off-by: zosrothko <zosrothko@orange.fr> * Exclude Crypto testsuite for now Signed-off-by: zosrothko <zosrothko@orange.fr> * Update for VS2017 Signed-off-by: zosrothko <zosrothko@orange.fr> * Update for VS2017 Signed-off-by: zosrothko <zosrothko@orange.fr>
* Workaround bug in SolarisStudio 12.4 on RVO-ed objects. * HttpClientSession set specific proxysettings for attached socket If we have a global proxy settings and we attach an external socket to the HTTPClientSession there's no way to use different proxy settings for that connection. For example if you do not need for that connection httpproxy because is already attached to the correct and point * Fix ".. has no member named ... compile error" (#1938) * Fix ".. has no member named ... compile error" by renaming apache conn_rec attributes - conn_rec attributes remote_ip and remote_addr were replaced by client_ip and client_addr once they have been renamed in Apache 2.4 - a server_rec pointer must be passed to ap_log_error() since apache 2.4, therefore, a change was necessary at the ap_log_error log function. A null pointer has been passed for avoiding deeper changes at the function. - the smart pointer auto_ptr was replaced by unique_ptr once it was made deprecated in C++11 standard, it has been replaced by unique_ptr. * Add the properly #ifdef directives for backward compatibility purposes - Adding proper #ifdef preprocessor directives to keeping backward compatibility with older apache versions. * Update ApacheConnector.cpp * Add Gradle build.scripts Signed-off-by: zosrothko <zosrothko@orange.fr> * New files Signed-off-by: zosrothko <zosrothko@orange.fr> * Add distrib directory Signed-off-by: zosrothko <zosrothko@orange.fr> * Add PostgreSQL. Remove POCO_NO_WSTRING Signed-off-by: zosrothko <zosrothko@orange.fr> * CYgwin: remove -DPOCO_NO_WSTRING & build Data/PostgreSQL (#1942) * Upgrade to mysql-5.7.19-win32 (#1944) * fix -Woverloaded-virtual * remove return * SyntaxException for DateTimeParser::parse not working #569 * remove leftover comment * fix some warnings * purge trailing whitespace (#1947) * add Poco::makeUnique() * NTP Packet impl not according to RFC958? #749 * Poco::Data ODBC impl doesn't bind to unsigned numeric types properly #1683 * Remove useless windows commands (#1948) * Remove useless Windows commands * Generate build_cmd only for VS140 & VS150 * Display target configuration * Upgrade to mysql-5.7.19 (#1951) * Travis & AppVeyor: Unbind PDF module (#1953) * Unbind PDF * Upgrade to mysql-5.7.19 * Put Cygwin ahead * Add --omit=PDF * Display target configuration (#1952) * #1878 Add OrangePi on Build Support (#1949) - Created the configuration `OrangePi`, based on ARM-Linux, with fine tune for OrangePi - I tested using Poco samples on OrangePi Zero Signed-off-by: Uilian Ries <uilianries@gmail.com> * fix mysql odbc tests * Renamed directory distrib to packaging Signed-off-by: zosrothko <zosrothko@orange.fr> * Update .gradle/ * Restore lost changes by git Signed-off-by: zosrothko <zosrothko@orange.fr> * Update openssl path Signed-off-by: zosrothko <zosrothko@orange.fr> * Comment out displaying the compiler log * Create issue_template.md * Compile all C source as C++ source * Add gradle submodule Signed-off-by: zosrothko <zosrothko@orange.fr> * Remove /TP for compiling C code Signed-off-by: zosrothko <zosrothko@orange.fr> * Reinsert SemiStaticLibrary build Signed-off-by: zosrothko <zosrothko@orange.fr> * Fixed invalid merge Signed-off-by: zosrothko <zosrothko@orange.fr> * Missing files Signed-off-by: zosrothko <zosrothko@orange.fr> * Oracle ODBC fixes * restore deleted documentation * wrong field size calculation in ODBC code #1659; other max size excession checks and testcase * Rebuild PocoDoc Signed-off-by: zosrothko <zosrothko@orange.fr> * Remove deleted includes Signed-off-by: zosrothko <zosrothko@orange.fr> * Align with develop branch * Add task pocoTasks and dependency with nuget & candle * some fixes (mostly unicode/bulk) * #264, #1684, #1950 * Buffer<> swap miss ownMem #1964 * speling fix * speling fix * make uninstall does not remove .so symlinks #1017 * add uninstall to phony * Base64Encoder/Decoder: added support for 'base64url' encoding * removed $ tags * remove remaining $Id$ tags from file headers * Fix/tcp dispatcher (#1965) * TCPServerDispatcher::run() issue #1884; make integral members atomic and minimize locking * Update TCPServerDispatcher.cpp * fix test * fix test with gcc * fixed GH #1934: File::setExecutable() on POSIX should set executable bit for group and other if corresponding readable bit is set * Implement MailMessage::decode #1543 (wip) * added PollSet class * updated VS project files for PollSet * PollSet: on Windows, use WSAPoll if available * GH #1412: added Poco::DigestEngine::constantTimeEquals() * - fix Zip Decompress Parent Path Injection #1968 bug - add valid patch check test - add vulnearbility triggering zip archive and test - remove temporary test output files - if possible, redirect temporary file generation to temp directory or - delete temporary files after tests * fix relative path check, eliminate unused warnings * minor fixes * minor fixes * Implement MailMessage::decode #1543 (wip 2) * fix warning * only convert encoded-word if explicitly requested * Add kit version 10 for message compiler (#1978) * Restore _ostr(std::cout) to avoid timeouts on AppVeyor (#1980) * additional fix for GH #1212: WebSocketImpl::available() now reports number of bytes in internal buffer. * fixed GH #1828: DeflatingStreamBuf::sync() should also flush underlying stream. * Implement MailMessage::decode #1543 (tentatively done); add encode 'B', decode 'Q' and 'B' * TextEncodingRegistry documentation * merged connection string URI support from 1.8 * fixed GH #1425: Workaround bug in SolarisStudio 12.4 on RVO-ed objects. * Remove Cygwin build (#1985) * fixed GH #1404: Add Poco::Data::Statement::bind() method * GH #1988: Remove OpenVMS support * replace strerror() with Poco::Error::getMessage() * replace strerror() with Poco::Error::getMessage() * upgraded bundled SQLite to 3.21.0 * Fix writing into closed socket from streambuf In case of error occured in writeToDevice pptr may become one byte farther than epptr. This can lead to crash in streambuf::xsputn from libstdc++. * CMake patches for FreeBSD (#1989) * Switch FreeBSD to poll * Link against dl and rt on FreeBSD * pd_json strerror deprecation warning on Windows #1984 * revert #1828 * Backport from poco-1.8.0 Signed-off-by: zosrothko <zosrothko@orange.fr> * Add coverage directory Signed-off-by: zosrothko <zosrothko@orange.fr> * Backport from poco-1.8.0 Signed-off-by: zosrothko <zosrothko@orange.fr> * Add coverage task & tools Signed-off-by: zosrothko <zosrothko@orange.fr> * Removed Signed-off-by: zosrothko <zosrothko@orange.fr> * Backport from poco-1.8.0 Signed-off-by: zosrothko <zosrothko@orange.fr> * Added Signed-off-by: zosrothko <zosrothko@orange.fr> * Add OpenCppCoverage & ReportGenerator tasks Signed-off-by: zosrothko <zosrothko@orange.fr> * Add CPPUNIT_IGNORE variable Signed-off-by: zosrothko <zosrothko@orange.fr> * style fix * updated README.md * Add mechanism to start a task from within a task (#1287) * Add mechanism to start a task from within a task Staying in the same thread. * Provide seeds for a task queue creation TaskManager::taskFinished removes the finished task from the task list before dispatching the taskFinished notification * fixup! Add mechanism to start a task from within a task * fixup! Add mechanism to start a task from within a task * Add Task::yield on the same model as Task::sleep * implement Poco::SharedPtr using std::shared_ptr (#1993) * added additional move constructor and assignment operators * Fix building XMLStreamParser with unbundled expat * Add Directory for coverage task * Remove Cygwin build that exceeds 2 hours and reaches the timeout * WiX Poco wxs should not port the Poco version * Harden RecursiveDirectoryIterator when walking the filesystem. (#2001) * In the implementation for the *Traverse strategies the next method performs an unguarded list directory. If the directory is not accessible an unrecoverable error is raised thus ruining the walk. This changeset adopts and adapts the error handling protocol as defined in Python's os.walk function where errors from listdir are ignored or are reported to an optional on error callback function. * Expand DirectoryIteratorsTest testsuite to confirm the hardened iterator behaviour over unreadable directories. * Expand DirectoryIteratorsTest testsuite to confirm the hardened iterator behaviour over unreadable directories. Correct bad formatting * fix clang compile * SharePtr fix for gcc 7.2 (#2004) * Fix EVPTest on RHEL/Fedora by removing hard-coded EC curve name (#2002) RHEL/Fedora seem to have a much more limited set of EC curves available by default. This change will instead use the first curve name as used in other places. * Parallel C++ compiler jobs limited to 2 * Updated to PCRE version 8.41 Testing Done: Built on Windows OS for all configurations. * Add missing '\'' * Removed * Cleanup * Cleanup Signed-off-by: zosrothko <zosrothko@orange.fr> * Remove removed XXXX_WIN32.h includes Signed-off-by: zosrothko <zosrothko@orange.fr> * Update for VisualStudio 2017 Signed-off-by: zosrothko <zosrothko@orange.fr> * Add debug log Signed-off-by: zosrothko <zosrothko@orange.fr> * Refactoring Signed-off-by: zosrothko <zosrothko@orange.fr> * dos2unix Signed-off-by: zosrothko <zosrothko@orange.fr> * SQLToMongoDB does not build * Merge Signed-off-by: zosrothko <zosrothko@orange.fr> * Exclude Crypto testsuite for now Signed-off-by: zosrothko <zosrothko@orange.fr> * Update for VS2017 Signed-off-by: zosrothko <zosrothko@orange.fr> * Update for VS2017 Signed-off-by: zosrothko <zosrothko@orange.fr> * Fixed performance issue: destructor of Poco::Timespan was not inlined [#CLICKHOUSE-3458]. * fixed GH #2038: Poco::Net::MultipartWriter::createBoundary() always returns the same string. * GH #2039: support for nested multi-part content * Small code style change (#2043) Making operator precedence explicit. * Add JSON in the includes path (#2027) * merge File::linkTo() from 1.8.1 * remove volatile * # 2042 * SQLite not handling parameter count mismatch correctly #2020 * Data/SQLite: Exception messages contain duplicate text #2012 * Travis CI (#2050) * Factorize info into new verbose file. Refactor Makefile, global, cpp11*. Add Linux32-clang * Display used config with POCO_VERBOSE * Add cross compilation toward x86 with host amd64 * Refactor config names * Add lib32gcc runtime * Add g++-5-multilib * Use OSARCH=i386 for OSX x86 * Avoid building Crypto since OpenSSL is only x64 on OSX * Avoid building Crypto since OpenSSL is only x64 * Avoid Data/* on cross compilation to x86 * Add gcc-5-multilib to clang 4.0 x86 * Ignore TimerTest on OSX for now. * Cleanup * Add other set of TimerTest. * New test that fails on OSX * Add TimerTest.testScheduleInterval() (#2053) * Poco::Net::NetworkInterface::list does not list inactive interfaces even when explicitly being asked for it #2044 * remove deprecated NetworkInterface typedef * move upgraded PDF from 1.8 * Update for VS2017 * Add Util::TimerTest * fix OSX NetworkInterface test * fix NetworkInterface test
I'm using 1.9.0 release and I still got this exception. Using Clang 4.0, and build on Linux aarch64 platform. nvidia@tegra-ubuntu:~$ uname -a http://192.168.0.21:8800/media/memberFace/plain_Pig7hP1.jpg I tried to apply patch of #1950, but it didn't work. |
I write a simple HTTP client to download a file and I get following exception:
I try to find out the root cause of these error because my code was working.
I found following weird bug:
I print following member stack addresses:
(see also my https://github.com/Bjoe/poco.git Branch: stack_address_issue)
and I get following result:
RefCountedObject::RefCountedObject() Stack address from _counter: 0x2639bc8
IPv4SocketAddressImpl::IPv4SocketAddressImpl() Stack address from _addr: 0x2639bcc
IPv4SocketAddressImpl::addr() Stack address from _addr: 0x2639bc8
WTH... why is the stack address from _addr in function addr the same stack addr in _counter 0x2639bc8 ?
I try some compiler and it looks like it only happens with clang and -std=XXX argument without any optimization:
clang++-3.8 -std=c++11
clang++-4.0 -std=c++11
clang++-3.8 -std=c++14
clang++-4.0 -std=c++14
If I move the function
from the header in the source file it works.
Have somebody an idea?
How looks like on android? They use also clang there.
Is this really a compiler bug?
Looks like on FreeBSD, they use clang as compiler, they have also this issue, see #1684
Here my code to test:
with my branch:
https://github.com/Bjoe/poco.git Branch: stack_address_issue
The text was updated successfully, but these errors were encountered: