Commit Graph

487 Commits (master)

Author SHA1 Message Date
مهدي شينون (Mehdi Chinoune) 7efcf4f935
Some fixes for MINGW (#828)
* Enable webpng on MINGW

* Detect GD version using cmake language

* Use _aligned_malloc instead of posix_memalign on Windows

* Include missing "errno.h"

* Fix finding WEBP on MINGW

* Fix finding XPM on MINGW

* Use PkgConfig to find packages on MINGW

* CI: Enable more options  for MINGW
2022-04-15 15:34:24 +07:00
Pierre Joye 09d5a6ad83 partial #818, fix again that logic. I need to find something more generic and convenient to handle errors, assert and free used resources on fail assert 2022-02-01 22:58:21 +07:00
Pierre Joye 95c6185b37
Bug/818 (#821)
* Partial #818, unused arg

* Partial #818, init var

* partail #818, fix va_args usage

* partail #818, handle f* calls and avoid possible call to malloc with negative values

* partail #818, prevent double free

* partail #818, resource leak if test fail

* partail #818, null deref fix

* partail #818, avoid double free on fp failure

* Partial #818, fix error msg

* Partial #818, leak on error

* Partial #818, null deref

* Partial #818, avoid possible negative index on failure

* partial #818, does not free if we return if requested new size overflow

* partial #818, avoid double free, free where the alloc happened

* partial #818, fix assert logic and test exp_size for <=0

* partial #818, fix assert logic for color idx test

* partial #818, new case for possible leak, improve logic

* partial #818, fix assert logic for color idx test
2022-02-01 22:25:03 +07:00
Pierre Joye 910924ffd7
Bug/818 (#820)
* Partial #818, unused arg

* Partial #818, init var

* partail #818, fix va_args usage

* partail #818, handle f* calls and avoid possible call to malloc with negative values

* partail #818, prevent double free

* partail #818, resource leak if test fail

* partail #818, null deref fix

* partail #818, avoid double free on fp failure

* Partial #818, fix error msg

* Partial #818, leak on error

* Partial #818, null deref

* Partial #818, avoid possible negative index on failure

* partial #818, does not free if we return if requested new size overflow

* partial #818, avoid double free, free where the alloc happened

* partial #818, fix assert logic and test exp_size for <=0

* partial #818, fix assert logic for color idx test
2022-02-01 17:37:49 +07:00
Pierre Joye 167ea1f4f0
Fix tests based on coverity reports (#819)
* Partial #818, unused arg

* Partial #818, init var

* partail #818, fix va_args usage

* partail #818, handle f* calls and avoid possible call to malloc with negative values

* partail #818, prevent double free

* partail #818, resource leak if test fail

* partail #818, null deref fix

* partail #818, avoid double free on fp failure

* Partial #818, fix error msg

* Partial #818, leak on error

* Partial #818, null deref

* Partial #818, avoid possible negative index on failure

* partial #818, does not free if we return if requested new size overflow

* partial #818, avoid double free, free where the alloc happened
2022-02-01 15:09:01 +07:00
Pierre Joye 0956816bc6
#797 possible leak on png error, returns from setjmp lost the row_poi… (#802)
* #797 possible leak on png error, returns from setjmp lost the row_pointers ref somehow

* skip that one using mingw until we have a reliable portable FP related tests suites (may never happpen)
2022-01-23 11:57:49 +07:00
Pierre Joye f1a53c0821
#788 fix bug in HEIF usage, stride is require (#801)
fix bug #788 in HEIF usage, stride is require
2022-01-22 17:29:04 +07:00
Tim Gates f7e57be725 docs: Fix a few typos
There are small typos in:
- examples/copyrotated.c
- src/gd.c
- src/gd.h
- src/gd_avif.c
- src/gd_nnquant.c
- src/gd_tga.c
- src/gd_topal.c
- src/wbmp.c
- tests/avif/compare_avif_to_png.c

Fixes:
- Should read `requires` rather than `reqiures`.
- Should read `of the` rather than `ofthe`.
- Should read `memory` rather than `memmory`.
- Should read `maximum` rather than `maxmum`.
- Should read `intersection` rather than `intertersection`.
- Should read `hypotenuse` rather than `hypothenus`.
- Should read `flexibility` rather than `flexibilty`.
- Should read `always` rather than `alwasy`.
- Should read `also` rather than `alos`.
2021-09-23 01:13:40 -04:00
Pierre Joye aed7181690 Fix #764 prevent crash in test code when AVIF encode/decode fails, fix memory leaks 2021-09-14 04:39:31 +07:00
Pierre Joye efffd21c36 Merge from 2.3 2021-09-11 23:38:22 +07:00
Pierre Joye 02f5a7ae05 merge conflict 2021-09-10 04:57:22 +07:00
Pierre Joye 8074c82046 fix warning 2021-09-10 04:51:57 +07:00
Christoph M. Becker beb18188a2
Stricter typing in test case
This avoids the compiler complaining about a pointer to int conversion.
2021-09-05 16:07:39 +02:00
Pierre Joye 4a0d7d86f0 Fix #320, should not convert the source to palette 2021-09-01 14:05:56 +07:00
Pierre Joye 6402cdf87e
Merge pull request #747 from libgd/features/mingw-ci
Rewrite CI to use Github Actions and improve builds. Platform:
- Ubuntu 20.04, gcc, x64 and ARM64 (graviton2)
- Ubuntu 20.04, clang, x64 and ARM64 (graviton2)
- Windows, x64, x86, arm64 VC
- Windows, mingw, x64, x86, ucrt64
- MacOS, x64 xcode

See docs/README_CI.md for additional details.
2021-09-01 10:21:20 +07:00
Pierre Joye 9251cd60d0
Merge pull request #736 from libgd/bug/415
Fix #415, Assuming TopOfs and LeftOfs zero, we can safely skip any (x…
2021-08-31 18:48:20 +07:00
Pierre Joye 4ff557bc31 disable these two on Graviton2, specific during runs it seems. Building&Running the tests manually 100s never fail 2021-08-30 04:09:16 +07:00
Pierre Joye 4b2b3cb961 typo 2021-08-29 01:24:13 +07:00
Pierre Joye 228eee9af6 restore logic 2021-08-29 01:09:58 +07:00
Pierre Joye 9daba6a306 let debug this on CI 2021-08-28 19:50:14 +07:00
Pierre Joye 10cd1fdf82 too early return 2021-08-28 11:46:59 +07:00
Pierre Joye 60ac1286ee windows logic 2021-08-28 11:34:54 +07:00
Pierre Joye 5c6dcd1648 don't attempt to create it, fall back to /tmp on linux/mingw like 2021-08-28 11:20:13 +07:00
Pierre Joye 9e02f64325 fix linux variants mkdstemp 2021-08-28 11:11:44 +07:00
Pierre Joye 9f597cb6d9 fix windows build 2021-08-28 10:52:19 +07:00
Pierre Joye 87ac6fdd02 fix linux/macos build 2021-08-28 15:41:42 +07:00
Pierre Joye d11355b4e7 Skip those on Mingw 32bit, rounding issues only on these enviromnents, won't fix. 2021-08-28 15:11:31 +07:00
Pierre Joye 33ade122c1 don't use gdTestAssert in these functions, we are not testing them. Proper null return and avoid random segv if environment is not setup correctly 2021-08-28 14:25:40 +07:00
Pierre Joye 6c38955d73 for the tests, it seems mingw can fail too often to find/create the tmpidr, let default it to ./tmp and fail if it cannot be created/used 2021-08-28 12:00:04 +07:00
Pierre Joye 0482d7a7e9 MINGW32 or MINGW64 2021-08-28 11:39:13 +07:00
Pierre Joye 6b5946fea0 Mingw support, and refactor a bit gdTest on Windows, simplifies 2021-08-27 18:16:19 +07:00
Pierre Joye b214ab236a
Merge pull request #737 from libgd/bug/405
Fix #405, -1 aims to reset the transparent color; refactor a bit; add test to existing test for -1
2021-08-27 01:24:00 +07:00
Pierre Joye 9396cd192a skip on Windows, no X11 to initialize 2021-08-27 00:30:52 +07:00
Pierre Joye b88bedabca return 0 on success 2021-08-26 22:45:15 +07:00
Pierre Joye 13d3b67822 Fix #402, negative determinant fails, only 0 or not finite should fail 2021-08-26 22:40:15 +07:00
Pierre Joye de563c2520
Merge pull request #636 from willson-chen/mv_gd_color_map_test_to_tests
Move src/gd_color_map_test.c to tests
2021-08-26 19:11:15 +07:00
Pierre Joye f705975eca fix test 2021-08-25 19:41:30 +07:00
Pierre Joye 25a2d12187 left over 2021-08-25 19:28:03 +07:00
Pierre Joye 67cc752b40 Fix #405, -1 aims to reset the transparent color; refactor a bit; add test to existing test for -1 2021-08-25 18:44:02 +07:00
Pierre Joye 4cd5542152 fix #415, the same is needed in the other section, add test 2021-08-25 17:48:03 +07:00
Pierre Joye 8890f527b2 #661, restore correct clamping, fixing alpha artifacts (these ones are the most visible) 2021-08-24 23:08:09 +07:00
Pierre Joye fd680a4b99 let see which one failed here 2021-08-20 14:51:58 +07:00
Pierre Joye 1f70ada0e4 not used 2021-08-17 06:26:29 +07:00
Pierre Joye b68f9a34c0 fix leaks in tests and extend a bit the timeout for ASAN mode 2021-08-13 21:57:22 +07:00
Pierre Joye bd72a7da40 WebP: Fix memory leak in test and avoid possible memory leak if size is not correct (ie. passing 0 size will leak). Min size is the WebP sign (3x32bits) 2021-08-13 21:14:36 +07:00
Adam Silverstein b3d1986e29 Clean formatting. 2021-05-05 11:50:28 -06:00
Adam Silverstein a2b3ba08ef Merge branch 'master' into webp-lossless
# Conflicts:
#	tests/webp/.gitignore
#	tests/webp/CMakeLists.txt
#	tests/webp/Makemodule.am
2021-05-05 09:30:02 -06:00
Remi Collet 1e47a89a65 fix #655 relax test when libraqm is used 2021-03-18 09:59:05 +01:00
Martin Reboredo f7d12c91fa
Permit compilation with libheif version 1.7.0 (#686)
libheif versions that came before 1.9.0 don't support changing the output image chroma.
I did not notice that and it resulted with tests failures across other OSes that don't have
a much newer libheif.

See #678. Supersedes #685.
2021-03-16 11:53:16 -04:00
Remi Collet 048cb47f20 add missing image for heif test 2021-03-16 10:51:22 +01:00