A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare test suite for msg-storage "ctest -R msg-storage"
[simgrid.git]
/
src
/
bindings
/
java
/
smx_context_cojava.c
diff --git
a/src/bindings/java/smx_context_cojava.c
b/src/bindings/java/smx_context_cojava.c
index
5e135f2
..
a998d69
100644
(file)
--- a/
src/bindings/java/smx_context_cojava.c
+++ b/
src/bindings/java/smx_context_cojava.c
@@
-1,6
+1,6
@@
/* context_cojava - implementation of context switching for java coroutines */
/* context_cojava - implementation of context switching for java coroutines */
-/* Copyright
2012
. The SimGrid Team.
+/* Copyright
(c) 2012-2013
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-264,7
+264,8
@@
static void smx_ctx_cojava_create_coroutine(smx_ctx_cojava_t context) {
FILE *conf= fopen("/proc/sys/vm/max_map_count","r");
if (conf) {
int limit=-1;
FILE *conf= fopen("/proc/sys/vm/max_map_count","r");
if (conf) {
int limit=-1;
- fscanf(conf,"%d",&limit);
+ if(fscanf(conf,"%d",&limit) != 1)
+ xbt_die("Error while creating a new coroutine. Parse error.");
fclose(conf);
if (limit!=-1 && SIMIX_process_count() > (limit - 100) /2)
xbt_die("Error while creating a new coroutine. "
fclose(conf);
if (limit!=-1 && SIMIX_process_count() > (limit - 100) /2)
xbt_die("Error while creating a new coroutine. "