Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d2ed905c
Kaydet (Commit)
d2ed905c
authored
Mar 28, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
when run under memcheck allow SIGUSR2 to dump current memory allocations
üst
f3876e3f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
soffice.sh
desktop/scripts/soffice.sh
+1
-0
signal.c
sal/osl/unx/signal.c
+40
-1
No files found.
desktop/scripts/soffice.sh
Dosyayı görüntüle @
d2ed905c
...
...
@@ -109,6 +109,7 @@ for arg in $@ $VALGRINDOPT ; do
fi
# finally set the valgrind check
VALGRINDCHECK
=
"valgrind --tool=
$VALGRIND
--trace-children=yes
$valgrind_skip
--num-callers=50 --error-limit=no --error-exitcode=101"
echo
"use kill -SIGUSR2 pid to dump traces of active allocations"
checks
=
"c
$checks
"
if
[
"
$VALGRIND
"
=
"memcheck"
]
;
then
export
G_SLICE
=
always-malloc
...
...
sal/osl/unx/signal.c
Dosyayı görüntüle @
d2ed905c
...
...
@@ -87,6 +87,10 @@
#define MAX_PATH_LEN 2048
#if defined(HAVE_MEMCHECK_H)
#include <memcheck.h>
#endif
typedef
struct
_oslSignalHandlerImpl
{
oslSignalHandlerFunction
Handler
;
...
...
@@ -260,8 +264,13 @@ static sal_Bool InitSignal()
sigfillset
(
&
(
act
.
sa_mask
));
/* Initialize the rest of the signals */
for
(
i
=
0
;
i
<
NoSignals
;
i
++
)
for
(
i
=
0
;
i
<
NoSignals
;
++
i
)
{
#if defined(HAVE_MEMCHECK_H)
if
(
Signals
[
i
].
Signal
==
SIGUSR2
&&
RUNNING_ON_VALGRIND
)
Signals
[
i
].
Action
=
ACT_IGNORE
;
#endif
/* hack: stomcatd is attaching JavaVM wich dont work with an sigaction(SEGV) */
if
((
bSetSEGVHandler
||
Signals
[
i
].
Signal
!=
SIGSEGV
)
&&
(
bSetWINCHHandler
||
Signals
[
i
].
Signal
!=
SIGWINCH
)
...
...
@@ -283,6 +292,7 @@ static sal_Bool InitSignal()
Signals
[
i
].
Handler
=
SIG_DFL
;
}
else
{
if
(
sigaction
(
Signals
[
i
].
Signal
,
&
act
,
&
oact
)
==
0
)
Signals
[
i
].
Handler
=
oact
.
sa_handler
;
else
...
...
@@ -290,6 +300,7 @@ static sal_Bool InitSignal()
}
}
}
}
/* Clear signal mask inherited from parent process (on Mac OS X, upon a
crash soffice re-execs itself from within the signal handler, so the
...
...
@@ -908,6 +919,26 @@ void CallSystemHandler(int Signal)
}
}
#if defined(HAVE_MEMCHECK_H)
static
void
DUMPCURRENTALLOCS
()
{
fprintf
(
stderr
,
"hello world
\n
"
);
VALGRIND_PRINTF
(
"=== start memcheck dump of active allocations ===
\n
"
);
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
VALGRIND_DO_LEAK_CHECK
;
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
# pragma GCC diagnostic pop
#endif
VALGRIND_PRINTF
(
"=== end memcheck dump of active allocations ===
\n
"
);
}
#endif
/*****************************************************************************/
/* SignalHandlerFunction */
...
...
@@ -947,6 +978,14 @@ void SignalHandlerFunction(int Signal)
Info
.
Signal
=
osl_Signal_Terminate
;
break
;
#if defined(HAVE_MEMCHECK_H)
case
SIGUSR2
:
if
(
RUNNING_ON_VALGRIND
)
DUMPCURRENTALLOCS
();
Info
.
Signal
=
osl_Signal_System
;
break
;
#endif
default:
Info
.
Signal
=
osl_Signal_System
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment