ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Control
CxxUtils
Root
PtrAccessSEGVHandler.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#define DEBUG 1
6
7
#include "
CxxUtils/PtrAccessSEGVHandler.h
"
8
#include "
CxxUtils/PageAccessControl.h
"
9
#include <cstdio>
10
#include <cstdlib>
11
12
void
13
PtrAccessSEGVHandler::handle
(
int
/*signal_number*/
,
siginfo_t
*sigi,
void
*
/*unused*/
) {
14
void
*addr=sigi->si_addr;
15
#ifdef DEBUG
16
printf(
"page fault @address=%p\n"
,sigi->si_addr);
17
#ifdef __ARCH_SI_TRAPNO
18
printf(
"page fault trapno=%d\n"
,sigi->si_trapno);
19
#endif
20
printf(
"page fault signo=%d\n"
,sigi->si_signo);
21
printf(
"page fault errno=%d\n"
,sigi->si_errno);
22
printf(
"this page fault failed because "
);
23
if
(SEGV_MAPERR == sigi->si_code)
24
printf(
"you tried to access an invalid address\n"
);
25
else
if
(SEGV_ACCERR == sigi->si_code) {
26
printf(
"you tried to access a protected address\n"
);
27
}
else
printf(
" an unknown reason. Page fault code=%d\n"
,sigi->si_code);
28
#endif
29
//record the access and restore page protection
30
if
(SEGV_ACCERR == sigi->si_code) {
31
m_pac
.restorePageProt(addr);
32
m_accessed
.push_back(addr);
33
}
else
abort();
34
}
siginfo_t
Definition:
SealSignal.h:77
PtrAccessSEGVHandler.h
This class provides a handle function that logs the addresses that had an access violation....
PageAccessControl.h
PtrAccessSEGVHandler::m_pac
PageAccessControl & m_pac
used to restore protection of the page which segfaulted
Definition:
PtrAccessSEGVHandler.h:50
PtrAccessSEGVHandler::handle
void handle(int signal_number, siginfo_t *sigi, void *unused)
the actual signal handler
Definition:
PtrAccessSEGVHandler.cxx:13
PtrAccessSEGVHandler::m_accessed
accessed_t m_accessed
the addresses accessed since last reset
Definition:
PtrAccessSEGVHandler.h:52
Generated on Thu Mar 13 2025 21:16:55 for ATLAS Offline Software by
1.8.18