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

AutoPtr change #2

Closed
wants to merge 1 commit into from
Closed

Conversation

RangelReale
Copy link
Contributor

  • AutoPtr constructor from AutoPtr that does a static or dynamic cast of the pointer

@aleks-f aleks-f closed this Mar 31, 2013
@HCETeam HCETeam mentioned this pull request Oct 24, 2013
aleks-f pushed a commit that referenced this pull request Jun 5, 2014
kostya-lnk-ms pushed a commit to kostya-lnk-ms/poco that referenced this pull request May 1, 2015
…stream:MSTKPROJ-1416 to ms-develop

* commit '213ddbc1c034f67d0a3573c35ed180d34c545400':
  MSTKPROJ-1416 added unsafe conversion to allow double strings to be converted to ints (to be more compat with RW)
  MSTKPROJ-1416 fix to possible binder initialization problem
  MSTKPROJ-1416 whitesoace fixes
  MSTKPROJ-1416 test additions and fixes
  MSTKPROJ-1416 test fixes
  MSTKPROJ-1416 fixed numeric fetching issues and sproc returning 0 empty result
sebastien-guay added a commit to sebastien-guay/poco that referenced this pull request May 1, 2017
…er" must protect the access to "NotifierPtr pNotifier"

Those two methods already use FastMutex::ScopedLock lock(_mutex), but
the scope is not large enough to protect "NotifierPtr pNotifier" that is
accessed by calling SocketNotifier::addObserver() and
SocketNotifier::removeObserver().

It is mentioned in SocketReator.h that it is safe to call
addEventHandler() and removeEventHandler() from another thread while the
SocketReactor is running. My current use of the SocketReactor
encountered an issue where the SocketNotifier::_events has been
corrupted by a concurent write access done by
SocketReactor::addEventHandler() and
SocketReactor::removeEventHandler().
The call stack show that the SocketReactor::addEventHandler is stuck in
a while loop in gcc/libstdc++/tree.cc Rb_tree_insert_and_rebalance()

I clearly see in my logs that it happened while my
SocketConnector::unregisterConnector() and
SocketConnector::registerConnector() were called by two different
threads.

#0 0x00a80a7b in std::_Rb_tree_insert_and_rebalance () from
/usr/lib/libstdc++.so.6
pocoproject#1 0x06ccb430 in std::_Rb_tree<Poco::Net::SocketNotification*,
Poco::Net::SocketNotification*,
std::_IdentityPoco::Net::SocketNotification*,
std::lessPoco::Net::SocketNotification*,
std::allocatorPoco::Net::SocketNotification* >::_M_insert
(this=0xac75dc90, __x=0x0, __p=0xac7ed0c8, __v=@0xb5fb0c40) at
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_tree.h:816
pocoproject#2 0x06ccb15d in std::_Rb_tree<Poco::Net::SocketNotification*,
Poco::Net::SocketNotification*,
std::_IdentityPoco::Net::SocketNotification*,
std::lessPoco::Net::SocketNotification*,
std::allocatorPoco::Net::SocketNotification* >::insert_equal
(this=0xac75dc90, __v=@0xb5fb0c40) at
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_tree.h:858
pocoproject#3 0x06ccad86 in std::multiset<Poco::Net::SocketNotification*,
std::lessPoco::Net::SocketNotification*,
std::allocatorPoco::Net::SocketNotification* >::insert (this=0xac75dc90,
__x=@0xb5fb0c40)
at
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_multiset.h:306
pocoproject#4 0x06cca72b in Poco::Net::SocketNotifier::addObserver
(this=0xac75dc70, pReactor=0x8d27958, observer=@0xb5fb0cd0) at
src/SocketNotifier.cpp:45
pocoproject#5 0x06cd060f in Poco::Net::SocketReactor::addEventHandler
(this=0x8d27958, socket=@0xac7f5a74, observer=@0xb5fb0cd0) at
src/SocketReactor.cpp:178

SocketReactor::run() is already protecting the access to the
SocketNotifier.
aleks-f pushed a commit that referenced this pull request Aug 10, 2017
…er" must protect the access to "NotifierPtr pNotifier" (#1709)

Those two methods already use FastMutex::ScopedLock lock(_mutex), but
the scope is not large enough to protect "NotifierPtr pNotifier" that is
accessed by calling SocketNotifier::addObserver() and
SocketNotifier::removeObserver().

It is mentioned in SocketReator.h that it is safe to call
addEventHandler() and removeEventHandler() from another thread while the
SocketReactor is running. My current use of the SocketReactor
encountered an issue where the SocketNotifier::_events has been
corrupted by a concurent write access done by
SocketReactor::addEventHandler() and
SocketReactor::removeEventHandler().
The call stack show that the SocketReactor::addEventHandler is stuck in
a while loop in gcc/libstdc++/tree.cc Rb_tree_insert_and_rebalance()

I clearly see in my logs that it happened while my
SocketConnector::unregisterConnector() and
SocketConnector::registerConnector() were called by two different
threads.

#0 0x00a80a7b in std::_Rb_tree_insert_and_rebalance () from
/usr/lib/libstdc++.so.6
#1 0x06ccb430 in std::_Rb_tree<Poco::Net::SocketNotification*,
Poco::Net::SocketNotification*,
std::_IdentityPoco::Net::SocketNotification*,
std::lessPoco::Net::SocketNotification*,
std::allocatorPoco::Net::SocketNotification* >::_M_insert
(this=0xac75dc90, __x=0x0, __p=0xac7ed0c8, __v=@0xb5fb0c40) at
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_tree.h:816
#2 0x06ccb15d in std::_Rb_tree<Poco::Net::SocketNotification*,
Poco::Net::SocketNotification*,
std::_IdentityPoco::Net::SocketNotification*,
std::lessPoco::Net::SocketNotification*,
std::allocatorPoco::Net::SocketNotification* >::insert_equal
(this=0xac75dc90, __v=@0xb5fb0c40) at
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_tree.h:858
#3 0x06ccad86 in std::multiset<Poco::Net::SocketNotification*,
std::lessPoco::Net::SocketNotification*,
std::allocatorPoco::Net::SocketNotification* >::insert (this=0xac75dc90,
__x=@0xb5fb0c40)
at
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/stl_multiset.h:306
#4 0x06cca72b in Poco::Net::SocketNotifier::addObserver
(this=0xac75dc70, pReactor=0x8d27958, observer=@0xb5fb0cd0) at
src/SocketNotifier.cpp:45
#5 0x06cd060f in Poco::Net::SocketReactor::addEventHandler
(this=0x8d27958, socket=@0xac7f5a74, observer=@0xb5fb0cd0) at
src/SocketReactor.cpp:178

SocketReactor::run() is already protecting the access to the
SocketNotifier.
@tenglong88 tenglong88 mentioned this pull request Oct 27, 2017
@Bjoe Bjoe mentioned this pull request Dec 4, 2017
ark0f added a commit to ark0f/poco that referenced this pull request Jun 6, 2018
aleks-f pushed a commit that referenced this pull request Jun 19, 2018
* Add MinGW support (not full yet).

TODO list:
* Fix tests compilation (undefined reference to CppUnit::...)
* Fix SQLs compilation (No rule to make target '${LIBNAME}.dll.a', needed by '${LIBNAME}.dll'.  Stop.)
* Fix crypto executables compilation
* Test static compilation
* Test MSVC compilation
* Add unicode support

See #2356

* Code rearrange.

Also fix PDF test runner.

TODO list:
* Fix tests compilation (undefined reference to CppUnit::...)
* Add unicode support
* Resolve what to do with message compiler

See #2356

* Normal "_DLL" definition for MinGW. Add missing "Crypto_API" for several implementations. Add "POCO_NO_MINGW_UNICODE" for "wmain".

TODO list:
* Check PostgreSQL and MySQL
* Resolve what to do with message compiler

See #2356

* Test PostgreSQL. Fix message compiler problem.

See #2356

* Perform requested changes. Add WinCE check.

See #2360

* Perform requested changes #2. Delete WinCE check.

See #2360

* Perform requested changes #3. Net initializer should works now.

See #2360

* Fix invalid indent.

See #2360

* Correct definition of POCO_NO_MINGW_UNICODE.

See #2360

* Remove macro and set global linke flags for testing purpose

* Add -municode for mingw where wmain is used

* Delete "POCO_ENABLE_EXE_WMAIN". Add PollSet support.

See #2360

* Restore WinCE linker flags. Set _WIN32_WINNT in PollSet.cpp separately. Add var to disable MinGW wmain wrapper.

* Fix compilation.

* Fix missing argument name in functions "setEscapeUnicode" in JSON package.
obiltschnig added a commit that referenced this pull request Nov 23, 2018
Fixed Poco::MongoDB not working on big-endian architecture system (#2
vitlibar pushed a commit to vitlibar/poco that referenced this pull request Nov 19, 2019
…BRARY. [#METR-21516] (pocoproject#2)

* Poco should not call `find_library(OpenSSL)` when USE_INTERNAL_SSL_LIBRARY. [#METR-21516]

* Minor fix.
vitlibar pushed a commit to vitlibar/poco that referenced this pull request Nov 19, 2019
…BRARY. [#METR-21516] (pocoproject#2)

* Poco should not call `find_library(OpenSSL)` when USE_INTERNAL_SSL_LIBRARY. [#METR-21516]

* Minor fix.
matejk added a commit that referenced this pull request Oct 9, 2024
==125909==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x74737b8121d3 at pc 0x74737e0f95fe bp 0x7fffd0d49940 sp 0x7fffd0d490e8
READ of size 4 at 0x74737b8121d3 thread T0
    #0 0x74737e0f95fd in memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc:115
    #1 0x5eb1aab242fd in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:29
    #2 0x5eb1aab242fd in Poco::BasicFIFOBuffer<char>::copy(char const*, unsigned long) /home/matejk/Documents/git/github/poco/Foundation/include/Poco/FIFOBuffer.h:326
    #3 0x5eb1aab04626 in CoreTest::testFIFOBufferChar() /home/matejk/Documents/git/github/poco/Foundation/testsuite/src/CoreTest.cpp:719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants