Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
- Loading branch information
David Abdurachmanov
authored and
David Abdurachmanov
committed
Jan 20, 2017
1 parent
100a91c
commit 0f28da5
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/src/buffer.cc b/src/buffer.cc | ||
index f12dcfd..40c74d1 100644 | ||
--- a/src/buffer.cc | ||
+++ b/src/buffer.cc | ||
@@ -62,12 +62,11 @@ IgProfBuffer::allocateRaw(size_t size) | ||
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); | ||
if (data != MAP_FAILED) | ||
return data; | ||
- else | ||
- { | ||
- igprof_debug("failed to allocate memory for profile buffer: %s (%d)\n", | ||
- strerror(errno), errno); | ||
- igprof_abort(); | ||
- } | ||
+ | ||
+ igprof_debug("failed to allocate memory for profile buffer: %s (%d)\n", | ||
+ strerror(errno), errno); | ||
+ igprof_abort(); | ||
+ __builtin_unreachable(); | ||
} | ||
|
||
void | ||
diff --git a/src/profile.cc b/src/profile.cc | ||
index 33f069c..35bca5a 100644 | ||
--- a/src/profile.cc | ||
+++ b/src/profile.cc | ||
@@ -29,7 +29,7 @@ | ||
#endif | ||
|
||
// Global variables initialised once here. | ||
-HIDDEN void (*igprof_abort)(void) __attribute__((noreturn)) = &abort; | ||
+HIDDEN void (*igprof_abort)(void) throw () = &abort; | ||
HIDDEN char * (*igprof_getenv)(const char *) = &getenv; | ||
HIDDEN int (*igprof_unsetenv)(const char *) = &unsetenv; | ||
HIDDEN bool s_igprof_activated = false; | ||
diff --git a/src/profile.h b/src/profile.h | ||
index 2a980d2..933f2f4 100644 | ||
--- a/src/profile.h | ||
+++ b/src/profile.h | ||
@@ -21,7 +21,7 @@ extern IgProfAtomic s_igprof_enabled; | ||
extern pthread_key_t s_igprof_bufkey; | ||
extern pthread_key_t s_igprof_flagkey; | ||
extern int s_igprof_stderrOpen; | ||
-extern void (*igprof_abort) (void) __attribute__((noreturn)); | ||
+extern void (*igprof_abort) (void) throw (); | ||
extern char * (*igprof_getenv) (const char *); | ||
extern int (*igprof_unsetenv) (const char *); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters