search for: throw_out_of_memory

Displaying 10 results from an estimated 10 matches for "throw_out_of_memory".

2017 Mar 03
14
[PATCH 00/11] Various Coverity fixes
Hi, this patch series fixes some issues discovered by Coverity. Most of them are memory leaks, usually on error; there are also invalid memory access issues. Thanks, Pino Toscano (11): java: link libguestfs_jni against libutils java: fix invalid memory access for FBuffer in struct lists daemon: tsk: properly use GUESTFS_MAX_CHUNK_SIZE edit: fix small memory leak on error java: fix
2016 Feb 05
7
[PATCH 0/7] lib: Stop exporting the safe_malloc, etc. functions.
The safe_malloc (etc) functions call g->abort_fn on failure. That's not appropriate for language bindings, and we never intended that these internal functions be used from language bindings, that was just a historical accident. This patch series removes any external use of the safe_* functions. Rich.
2017 Mar 06
7
[PATCH 0/6] Various Coverity fixes #2
Hi, this patch series fixes few more issues discovered by Coverity. Thanks, Pino Toscano (6): tail: check the return value pf guestfs_set_pgroup daemon: btrfs: check end_stringsbuf return values everywhere java: use cleanup handlers for structs (lists) as return values lib: qemu: improve handling of FILE* p2v: check more return values p2v: fix possible close(-1) issue cat/tail.c
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...t;String %s" n | BufferIn n -> pr "byte[] %s" n - | StringList n | DeviceList n | FilenameList n -> + | StringList (_, n) -> pr "String[] %s" n | Bool n -> pr "boolean %s" n @@ -641,18 +635,12 @@ throw_out_of_memory (JNIEnv *env, const char *msg) pr " (JNIEnv *env, jobject obj, jlong jg"; List.iter ( function - | Pathname n - | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n - | String n - | OptString n - | FileIn n - | Fi...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
..., FBuffer -> pr " {\n"; pr " size_t len = r->%s_len;\n" name; - pr " char s[len+1];\n"; + pr " CLEANUP_FREE char *s = malloc (len + 1);\n"; + pr " if (s == NULL) {\n"; + pr " throw_out_of_memory (env, \"malloc\");\n"; + pr " goto ret_error;\n"; + pr " }\n"; pr " memcpy (s, r->%s, len);\n" name; pr " s[len] = 0;\n"; pr " fl = (*env)->GetFieldID (env, cl, \"%s\&quo...
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...ion = c_function } -> if can_generate style then ( pr "foreign import ccall unsafe \"guestfs.h %s\" c_%s\n" diff --git a/generator/java.ml b/generator/java.ml index 94d68c14a..308f65bd8 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -614,7 +614,7 @@ throw_out_of_memory (JNIEnv *env, const char *msg) "; List.iter ( - fun { name = name; style = (ret, args, optargs as style); + fun { name; style = (ret, args, optargs as style); c_function = c_function } -> pr "\n"; pr "JNIEXPORT "; diff --git a/generat...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...= if optargs <> [] then doc ^ "\n\nOptional arguments are supplied in the final Map<String,Object> parameter, which is a hash of the argument name to its value (cast to Object). Pass an empty Map or null for no optional arguments." @@ -625,7 +627,7 @@ throw_out_of_memory (JNIEnv *env, const char *msg) ); pr "JNICALL\n"; pr "Java_com_redhat_et_libguestfs_GuestFS_"; - pr "%s" (replace_str ("_" ^ name) "_" "_1"); + pr "%s" (String.replace ("_" ^ name) "_...
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.