diff options
author | Kyungwook Tak <k.tak@samsung.com> | 2017-01-06 17:15:47 +0900 |
---|---|---|
committer | kyungwook tak <k.tak@samsung.com> | 2017-01-06 00:21:52 -0800 |
commit | ae6388344694f5e068172e6f8c1d48b0cf4bfb05 (patch) | |
tree | 93fc67022148e55ed09ae8163984e894dc6ccefd | |
parent | eb3377ead579ea16045fb6c49f9fd6b26947cfc3 (diff) | |
download | drm-service-core-tizen-accepted/tizen/unified/20170309.033147.tar.gz drm-service-core-tizen-accepted/tizen/unified/20170309.033147.tar.bz2 drm-service-core-tizen-accepted/tizen/unified/20170309.033147.zip |
Remove std::nothrow from ASLR enabled binsubmit/tizen_unified/20170308.100408submit/tizen/20170109.064234accepted/tizen/wearable/20170109.084922accepted/tizen/unified/20170309.033147accepted/tizen/tv/20170109.084904accepted/tizen/mobile/20170109.084837accepted/tizen/ivi/20170109.084941accepted/tizen/common/20170109.202447accepted/tizen_wearableaccepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_common
std::nothrow in glibc from gcc6.2 cannot linked with ASLR enabled
executable in x86 series architectures but don't know why...
So just use default new and handle std::bad_alloc.
Change-Id: I21191c108e94be4ca2c7157807407f8f6ec5f4d3
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
-rw-r--r-- | tappsd/src/db/DTapps2SqliteDB.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tappsd/src/db/DTapps2SqliteDB.cpp b/tappsd/src/db/DTapps2SqliteDB.cpp index 31d78e0..51e2653 100644 --- a/tappsd/src/db/DTapps2SqliteDB.cpp +++ b/tappsd/src/db/DTapps2SqliteDB.cpp @@ -104,11 +104,12 @@ BOOL DTappsDBOpen(void *&pDb, const char *CallingFun) pDb = pDBConnectionInfo->pDBConnection; } else { DRM_TAPPS_LOG("no connection exists.."); - std::unique_ptr<DtappsDBConnectionInfo> pDBConnectionInfo( - new(std::nothrow) DtappsDBConnectionInfo); - - if (pDBConnectionInfo == NULL) + std::unique_ptr<DtappsDBConnectionInfo> pDBConnectionInfo; + try { + pDBConnectionInfo.reset(new DtappsDBConnectionInfo); + } catch (const std::bad_alloc &) { return FALSE; + } DRM_TAPPS_FRQ_LOG("Opening DB connection."); |