Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_connections failed #1867

Closed
Closed
@zodf0055980

Description

@zodf0055980

I build libvips with ASAN/MSAN, it causes FAIL: test_connections.shafter I run make check.
test-suite.log:

======================================
   vips 8.11.0: test/test-suite.log
======================================

# TOTAL: 7
# PASS:  6
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test_connections.sh
=========================

/home/yuan/afl-target/libvips/test/test-suite/images/sample.jpg
/home/yuan/afl-target/libvips/test/tmp-29210/x.png

(process:29327): GLib-CRITICAL **: 20:47:19.314: g_path_get_basename: assertion 'file_name != NULL' failed

=================================================================
==29327==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 22952 byte(s) in 1 object(s) allocated from:
    #0 0x7f6a6c52cb40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x7f6a6af1f5d7 in g_file_get_contents (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x385d7)

SUMMARY: AddressSanitizer: 22952 byte(s) leaked in 1 allocation(s).
FAIL test_connections.sh (exit status: 1)

The error is : (process:29753): GLib-CRITICAL **: 20:14:04.679: g_path_get_basename: assertion 'file_name != NULL' failed
It calls if (VIPS_INIT(NULL)) in test_connections.c, however VIPS_INIT() calls vips_guess_prefix(argv0, "VIPSHOME") and argv0 is NULL
vips_guess_prefix() call g_path_get_basename(argv0) without check argv0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions