Comments (6)
From which ACE version is this trace? On which Windows version do you see this runtime behavior? What is your ace/config.h file contents?
from ace_tao.
Hello,
Sorry about the omitted details, added to the original ticket:
Win 10 Enterprise / 64bit. Ace-6.0.3b.
Config:
#ifndef ACE_CONFIG_H
#define ACE_LACKS_IOSTREAM_TOTALLY
#define ACE_HAS_REACTOR_NOTIFICATION_QUEUE 1
#define ACE_AS_STATIC_LIBS 1
#ifdef WIN32
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#define ACE_HAS_TOKENS_LIBRARY
#define ACE_USES_WCHAR
#define ACE_DEFAULT_THREAD_KEYS 1088
#include "ace/config-win32.h"
#elif defined (WINCE)
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#define ACE_HAS_TOKENS_LIBRARY
#define ACE_USES_WCHAR
#include "ace/config-win32.h"
#elif defined (APPLE_CC)
#define ACE_HAS_STRPTIME 1
#define ACE_LACKS_UNSETENV
#define ACE_LACKS_ISCTYPE
#define ACE_NEEDS_DL_UNDERSCORE
#include "ace/config-macosx-tiger.h"
#else
#include "ace/config-linux.h"
#endif#endif
Looks like we do define ACE_DEFAULT_THREAD_KEYS to 1088 here, but it would be defined to the same value in config-win32-common anyway.
from ace_tao.
We haven't seen runtime problems on Windows 10 in any of our runtime testing. Can you try a more recent ACE release, a lot has changed between the versions.
from ace_tao.
I would like to but I am a bit short on time at the moment. I think it is quite easy to see from the source though that the return value of ::TlsAlloc is being used as the index into an array on Windows.
Also found this mailing list entry which is indicating the same problem.
from ace_tao.
This is in the core of ACE and changing this would require some work. Maybe you can propose a fix in ACE and make a pull request with the necessary changes and test extensions.
If not, see http://www.dre.vanderbilt.edu/~schmidt/commercial-support.html for the companies providing support, including Remedy IT the company I work for.
from ace_tao.
This problem still exist in ACE 6.5.1. As stated by @malwoden, the return value of TlsAlloc is used as an index, which is not allowed.
In normal conditions TlsAlloc will almost always return low values, but there is there no guarantee for it.
The problem is very easy to reproduce:
- Create a basic ACE application
- Use the Windows Application Verifier (installed in "C:\Windows\System32\appverif.exe") and add the application to the list of application that should be checked by the OS. Application Verifier enables by default the "Basics\TLS" test for new added applications.
- Start the ACE application.
On my machine (Windows 10 x64 1803) TlsAlloc would return 13 if TLS checking is disabled and 895930 when checking is enabled.
As 895930 is larger then ACE_DEFAULT_THREAD_KEYS (1088 on win32), ACE will call __ace_assert, which will try to log the error.
void __ace_assert(const char *file, int line, const ACE_TCHAR *expression)
{
int error = ACE_Log_Msg::last_error_adapter ();
ACE_Log_Msg *log = ACE_Log_Msg::instance ();
__ace_assert calls ACE_Log_Msg::instance that will trigger a new __ace_assert, etc.. causing the stack overflow.
Workaround:
To use the Windows Application Verifier in combination with applications that use ACE, the TLS test should be disabled.
Minor remark:
The thr_keycreate_native function compares the return value of TlsAlloc with ACE_SYSCALL_FAILED.
ACE_OS::thr_keycreate_native (ACE_OS_thread_key_t *key,
{
...
ACE_UNUSED_ARG (dest);
*key = ::TlsAlloc ();
if (*key == ACE_SYSCALL_FAILED)
ACE_FAIL_RETURN (-1);
...
}
The Win32 documentation states that the return value of TlsAlloc should be compared with the macro TLS_OUT_OF_INDEXES. As the macros ACE_SYSCALL_FAILED and TLS_OUT_OF_INDEXES are both defined as 0xFFFFFFFF this is not a practical problem.
from ace_tao.
Related Issues (20)
- ACE/TAO Wide Strings on Linux HOT 2
- GHA Windows TAO builds failing, possibly due to Perl 5.38.0 HOT 3
- reserved identifier violation HOT 3
- Throwing exceptions i.e. 'TAO_3_1_2::CORBA::MARSHAL' which is not derived from 'std::exception' HOT 4
- ".\CosNotification.idl", line 59: spelling differs from IDL keyword only in case: "EventType"
- Race condition in ACE_Future double checked locking pattern code HOT 6
- g++error,build ACE on windows with g++ HOT 5
- shell file syntax error:Unterminated quote string HOT 4
- Use after free reported by scan-build (clang version 15.0.7) in OS_NS_stdio.inl HOT 1
- SSLIOP Transports are used after being cached with entry state IDLE
- ACE_Dev_Poll_Reactor avoid handle arrays and Handler_Repository size based on RLIMIT_NOFILE
- Look at replace TAO::Object is_evaluated_/object_init_lock_ members with a std::atomic_flag HOT 2
- ACE_TAO is build in gcc 6 and above not in <5 gcc HOT 6
- Issue in generating projects & solutions for VS2019 for SSL HOT 1
- Issue in implementing SSL using ImplRepoService
- `tao_idl` Will Create a Directory Each Time a `-o*` Option is Passed
- Corbaloc resolution issue when implementing SSL with Impl Repo HOT 4
- Broken links in ACE and TAO documentation.... $ACE_ROOT/TAO doesn't exist in github version. $ACE_ROOT/../TAO does HOT 1
- Does ACE_TAO support TLS 1.3? HOT 2
- [ace6tao2] Comparison warning in CDR_Base.cpp HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ace_tao.