Alexander Lakhin <exclusion@gmail.com> writes:
> I discovered one more issue in this area. This OOM condition emulation:
> --- a/src/backend/snowball/libstemmer/api.c
> +++ b/src/backend/snowball/libstemmer/api.c
> @@ -6,3 +6,3 @@ extern struct SN_env * SN_new_env(int alloc_size)
> {
> - struct SN_env * z = (struct SN_env *) malloc(alloc_size);
> + struct SN_env * z = (rand() % 2 == 0) ? NULL : (struct SN_env *) malloc(alloc_size);
> if (z == NULL) return NULL;
> leads to `make check` crashes like:
Hmph. SN_new_env itself is visibly okay with this, so the failure is
in some caller. I'm too tired to dig into it myself, but can you
identify the culprit more precisely?
regards, tom lane