Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input.
Noah Misch <noah@leadboat.com>
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this, the expected test output has been depending on freed stack memory. "gcc -ftrivial-auto-var-init=pattern" revealed that. Back-patch to v13 (all supported versions). Discussion: https://postgr.es/m/20250106192748.cf.nmisch@google.com
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/ecpg/test/compat_informix/dec_test.pgc | modified | +10 −0 |
| src/interfaces/ecpg/test/expected/compat_informix-dec_test.c | modified | +10 −0 |
| src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout | modified | +116 −116 |
Discussion
- ECPG deccall3 functions vs. risnull() inputs 1 message · 2025-01-06