postgres.git / summary / log / commit / refs

commit    e8808f3d72355e701a7abf4150b5b63e1df37d55
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Sat Jan 09 18:02:54 2016 +0000

    Add STRICT to some C functions created by the regression tests.
    
    These functions readily crash when passed a NULL input value.  The tests
    themselves do not pass NULL values to them; but when the regression
    database is used as a basis for fuzz testing, they cause a lot of noise.
    Also, if someone were to leave a regression database lying about in a
    production installation, these would create a minor security hazard.
    
    Andreas Seltenreich


src/test/regress/input/create_function_2.source | 12 ++++++------ src/test/regress/output/create_function_2.source | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/test/regress/input/create_function_2.source b/src/test/regress/input/create_function_2.source index 6aed5f008b9..f2143850788 100644 --- a/src/test/regress/input/create_function_2.source +++ b/src/test/regress/input/create_function_2.source @@ -37,32 +37,32 @@ CREATE FUNCTION user_relns() CREATE FUNCTION pt_in_widget(point, widget) RETURNS bool AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION overpaid(emp) RETURNS bool AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION boxarea(box) RETURNS float8 AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION interpt_pp(path, path) RETURNS point AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION reverse_name(name) RETURNS name AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION oldstyle_length(int4, text) RETURNS int4 AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C; -- intentionally not strict -- -- Function dynamic loading diff --git a/src/test/regress/output/create_function_2.source b/src/test/regress/output/create_function_2.source index 94ab7eba566..d492c3a51d3 100644 --- a/src/test/regress/output/create_function_2.source +++ b/src/test/regress/output/create_function_2.source @@ -30,27 +30,27 @@ CREATE FUNCTION user_relns() CREATE FUNCTION pt_in_widget(point, widget) RETURNS bool AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION overpaid(emp) RETURNS bool AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION boxarea(box) RETURNS float8 AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION interpt_pp(path, path) RETURNS point AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION reverse_name(name) RETURNS name AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C STRICT; CREATE FUNCTION oldstyle_length(int4, text) RETURNS int4 AS '@libdir@/regress@DLSUFFIX@' - LANGUAGE C; + LANGUAGE C; -- intentionally not strict -- -- Function dynamic loading -- [parent: b05a34739fc1]