Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
esm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lrs
esm
Commits
5f318d80
Commit
5f318d80
authored
6 years ago
by
Torsten Merz
Browse files
Options
Downloads
Patches
Plain Diff
added sig_atomic_t type size check
parent
0af5c61d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smi/src/nrt_system.c
+10
-0
10 additions, 0 deletions
smi/src/nrt_system.c
with
10 additions
and
0 deletions
smi/src/nrt_system.c
+
10
−
0
View file @
5f318d80
...
...
@@ -7,6 +7,8 @@
#include
<stdlib.h>
#include
<sys/io.h>
#include
<sys/resource.h>
#include
<limits.h>
#include
<signal.h>
// UDP socket related
#include
<netdb.h>
...
...
@@ -375,6 +377,14 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) {
printf
(
"[nrtSmi] data type mismatch
\n
"
);
goto
exit
;
}
/* check size of sig_atomic_t type */
if
(
sizeof
(
sig_atomic_t
)
*
CHAR_BIT
<
4
*
8
)
{
error
=
4
;
printf
(
"[nrtSmi] atomic type size too small
\n
"
);
goto
exit
;
}
printf
(
"[nrtSmi] allocating system shared memory
\n
"
);
if
(
initShm
(
&
shm_fd
,
sizeof
(
shm_struct
),(
void
*
)
&
shm
,
SHM_FILE
)
!=
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment