Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,324
Issues
4,324
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
385
Merge Requests
385
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
91bfa780
Commit
91bfa780
authored
Feb 26, 2010
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash when using printf format specifiers in traceEvent (
#3874
)
parent
b1b95df6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
rts/Trace.c
rts/Trace.c
+11
-3
rts/eventlog/EventLog.c
rts/eventlog/EventLog.c
+2
-2
rts/eventlog/EventLog.h
rts/eventlog/EventLog.h
+1
-1
No files found.
rts/Trace.c
View file @
91bfa780
...
...
@@ -299,21 +299,29 @@ void trace_(char *msg, ...)
va_end
(
ap
);
}
void
traceUserMsg
(
Capability
*
cap
,
char
*
msg
)
static
void
traceFormatUserMsg
(
Capability
*
cap
,
char
*
msg
,
...
)
{
va_list
ap
;
va_start
(
ap
,
msg
);
#ifdef DEBUG
if
(
RtsFlags
.
TraceFlags
.
tracing
==
TRACE_STDERR
)
{
traceCap_stderr
(
cap
,
msg
,
NULL
);
traceCap_stderr
(
cap
,
msg
,
ap
);
}
else
#endif
{
if
(
eventlog_enabled
)
{
postUserMsg
(
cap
,
msg
);
postUserMsg
(
cap
,
msg
,
ap
);
}
}
dtraceUserMsg
(
cap
->
no
,
msg
);
}
void
traceUserMsg
(
Capability
*
cap
,
char
*
msg
)
{
traceFormatUserMsg
(
cap
,
"%s"
,
msg
);
}
void
traceThreadStatus_
(
StgTSO
*
tso
USED_IF_DEBUG
)
{
#ifdef DEBUG
...
...
rts/eventlog/EventLog.c
View file @
91bfa780
...
...
@@ -448,9 +448,9 @@ void postCapMsg(Capability *cap, char *msg, va_list ap)
postLogMsg
(
&
capEventBuf
[
cap
->
no
],
EVENT_LOG_MSG
,
msg
,
ap
);
}
void
postUserMsg
(
Capability
*
cap
,
char
*
msg
)
void
postUserMsg
(
Capability
*
cap
,
char
*
msg
,
va_list
ap
)
{
postLogMsg
(
&
capEventBuf
[
cap
->
no
],
EVENT_USER_MSG
,
msg
,
NULL
);
postLogMsg
(
&
capEventBuf
[
cap
->
no
],
EVENT_USER_MSG
,
msg
,
ap
);
}
void
closeBlockMarker
(
EventsBuf
*
ebuf
)
...
...
rts/eventlog/EventLog.h
View file @
91bfa780
...
...
@@ -39,7 +39,7 @@ void postEvent(Capability *cap, EventTypeNum tag);
void
postMsg
(
char
*
msg
,
va_list
ap
);
void
postUserMsg
(
Capability
*
cap
,
char
*
msg
);
void
postUserMsg
(
Capability
*
cap
,
char
*
msg
,
va_list
ap
);
void
postCapMsg
(
Capability
*
cap
,
char
*
msg
,
va_list
ap
);
...
...
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