1. 29 11月, 2018 2 次提交
    • N
      New pg_regress argument to hook the tests. · d1031682
      Ning Yu 提交于
      This is a preparation of an upcoming random ICG pipeline job.  In that
      pipeline job we will have tables created on different segments, so far
      the only way to hack this behavior is by using the gp_debug_numsegments
      extension.  We want to load and execute that extension for all the tests
      without modifying them directly, so a hook mechanism is needed.
      
      Added a pg_regress argument --prehook to set a hook.  A hook script
      should be put under src/test/regress/{sql,input}/hooks/ directory,
      depending on whether it need pg_regress to substitute the @@ tokens.  At
      most one hook can be specied.  It can be set via make command like this:
      
          # suppose there is src/test/regress/sql/hooks/hookname.sql
          make installcheck EXTRA_REGRESS_OPTS=--prehook=hookname
      d1031682
    • N
      New pg_regress argument to ignore plan diffs. · aea6d06d
      Ning Yu 提交于
      This is a preparation of an upcoming random ICG pipeline job.  In that
      pipeline job we will have tables created on different segments, so the
      plans might be different expectation.  In atmsort.pm there is already an
      argument -gpd_ignore_plans to ignore the plan diffs, but there was no
      equivalence in pg_regress.
      
      Added a pg_regress argument --ignore-plans to ignore plan diffs.  It can
      be enabled via make command like this:
      
          make installcheck EXTRA_REGRESS_OPTS=--ignore-plans
      aea6d06d
  2. 13 10月, 2018 1 次提交
    • A
      Disable fallback on cannonical results file in pg_regress · bd8fb75d
      Ashwin Agrawal 提交于
      In GPDB, platform_expectfile is used for determining
      ORCA/planner/resgroup expect files, wheras in upstream that is not the
      case and it is based on the underlying platform. Thus, it is unnecessary
      and confusing to compare against default answer file even when
      platform_expect file exists. It gets confusing because the below block
      chooses the best expect file based on the number of lines in diff file.
      Co-authored-by: NEkta Khanna <ekhanna@pivotal.io>
      bd8fb75d
  3. 03 8月, 2018 1 次提交
  4. 02 8月, 2018 1 次提交
    • R
      Merge with PostgreSQL 9.2beta2. · 4750e1b6
      Richard Guo 提交于
      This is the final batch of commits from PostgreSQL 9.2 development,
      up to the point where the REL9_2_STABLE branch was created, and 9.3
      development started on the PostgreSQL master branch.
      
      Notable upstream changes:
      
      * Index-only scan was included in the batch of upstream commits. It
        allows queries to retrieve data only from indexes, avoiding heap access.
      
      * Group commit was added to work effectively under heavy load. Previously,
        batching of commits became ineffective as the write workload increased,
        because of internal lock contention.
      
      * A new fast-path lock mechanism was added to reduce the overhead of
        taking and releasing certain types of locks which are taken and released
        very frequently but rarely conflict.
      
      * The new "parameterized path" mechanism was added. It allows inner index
        scans to use values from relations that are more than one join level up
        from the scan. This can greatly improve performance in situations where
        semantic restrictions (such as outer joins) limit the allowed join orderings.
      
      * SP-GiST (Space-Partitioned GiST) index access method was added to support
        unbalanced partitioned search structures. For suitable problems, SP-GiST can
        be faster than GiST in both index build time and search time.
      
      * Checkpoints now are performed by a dedicated background process. Formerly
        the background writer did both dirty-page writing and checkpointing. Separating
        this into two processes allows each goal to be accomplished more predictably.
      
      * Custom plan was supported for specific parameter values even when using
        prepared statements.
      
      * API for FDW was improved to provide multiple access "paths" for their tables,
        allowing more flexibility in join planning.
      
      * Security_barrier option was added for views to prevents optimizations that
        might allow view-protected data to be exposed to users.
      
      * Range data type was added to store a lower and upper bound belonging to its
        base data type.
      
      * CTAS (CREATE TABLE AS/SELECT INTO) is now treated as utility statement. The
        SELECT query is planned during the execution of the utility. To conform to
        this change, GPDB executes the utility statement only on QD and dispatches
        the plan of the SELECT query to QEs.
      Co-authored-by: NAdam Lee <ali@pivotal.io>
      Co-authored-by: NAlexandra Wang <lewang@pivotal.io>
      Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io>
      Co-authored-by: NAsim R P <apraveen@pivotal.io>
      Co-authored-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
      Co-authored-by: NGang Xiong <gxiong@pivotal.io>
      Co-authored-by: NHaozhou Wang <hawang@pivotal.io>
      Co-authored-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
      Co-authored-by: NJesse Zhang <sbjesse@gmail.com>
      Co-authored-by: NJinbao Chen <jinchen@pivotal.io>
      Co-authored-by: NJoao Pereira <jdealmeidapereira@pivotal.io>
      Co-authored-by: NMelanie Plageman <mplageman@pivotal.io>
      Co-authored-by: NPaul Guo <paulguo@gmail.com>
      Co-authored-by: NRichard Guo <guofenglinux@gmail.com>
      Co-authored-by: NShujie Zhang <shzhang@pivotal.io>
      Co-authored-by: NTaylor Vesely <tvesely@pivotal.io>
      Co-authored-by: NZhenghua Lyu <zlv@pivotal.io>
      4750e1b6
  5. 25 1月, 2018 1 次提交
    • D
      Revert encoding handling in pg_regress to upstream · bc3bb796
      Daniel Gustafsson 提交于
      If we avoid calling pg_regress with an empty --multibyte we
      can skip GPDB specific handling of the encoding parameter in
      pg_regress and instead follow upstream. While the local diffs
      to pg_regress weren't wrong per se, avoiding merge conflicts
      is of more interest.
      
      Also revert the commented out MULTIBYTE in the makefile to
      match the upstream value. A follow-up commit will fix this
      as well.
      bc3bb796
  6. 18 1月, 2018 1 次提交
    • J
      Remove codgen wholesale (#4301) · fa65063d
      Jesse Zhang 提交于
      This patch removes codegen wholesale from Greenplum.
      
      In addition to reverting the commits involving codegen, we also removed
      miscellaneous references to the feature and GUC.
      
      The following commits from 5.0.0 were reverted (topologically ordered):
      
      f38c9064 Support avg aggregate function in codegen
      87dcae4c Capture and print error messages from llvm::verifyFunction
      65137540 libgpcodegen assert() overrides use GPDB Assert()
      81d378b4 GenerateExecVariableList calls regular slot_getattr when the code generation of the latter fails
      05a28211 Update Google Test source path used by codegen
      22a35fcc Call ereport when code generating float operators
      79517271 Support overflow checks for doubles.
      b5373a1e Fix codegen unittest link problem
      7a1a98c9 Print filename and lineno in codegened CreateElog
      58eda293 Fix wrong virtual tuple check in codegened slot_getattr
      bc6faa08 Set llvm_isNull_ptr to false when the result of codegened expression evaluation is not null
      8bbbd63f Enhance codegened advance_aggregates with support for null attributes
      e1fd6072 Abort code generation of expression evaluation trees with unsupported ExprState types
      509460ee Support null attributes in codegen expression evaluation framework
      739d978d Move enrollment of codegened ExecVariableList to ExecInitNode
      c05528d1 Fix CHECK_SYMBOL_DEFINED macro in CMakeLists.txt
      12cfd7bd Support offset calculation when there is null in the tuple and codegen is enabled
      40a2631e Use slot_getattr wrapper function for regular version.(#1194)
      613e9fbb Revert "Fix codegen issue by moving slot_getattr to heaptuple.c similar to"
      ee03f799 Fix cpplint error on advance aggregate
      2a65b0aa Fix slot function nullptr issue in expr eval.
      3107fc0e Fix for !(expr1 & expr2) and hasnull logic in slot_getatrr codegen.
      c940c7f6 Fix codegen issue by moving slot_getattr to heaptuple.c similar to Postgres.
      c8125736 Introduce guc to enable/disable all generator.
      a4f39507 Ensure that codegen unittests pass with GCC 6.2.0 (#1177)
      682d0b28 Allow overriding assert() functionality in libgpcodegen in DEBUG mode
      3209258a Organize codegen source files and unit tests
      d2ba88a9 Fix codegen unittests using DatumCastGenerator
      020b71a5 Generate code for COUNT aggregate function
      0eeec886 Fixing codegen related bugs in InitializeSupportedFunction
      41055352 Rewrite PGGenericFuncGenerator to support variable number of types
      e5318b6b Add AdvanceAggregatesCodegenEnroll mock function
      87521715 Codegen advance_aggregates for SUM transition function
      2043d95b Use string messages in codegened slot_getattr fallback block
      f160fa5a Add new GUC to control Codegen Optimization level.
      697ffc1a Fix cpplint errors
      c5e3aed4 Support Virtual Tuples and Memtuples in SlotGetAttrCodegen
      5996aaa7 Keep a reference to the CodegenManager in code generators
      6833b3c2 Remove unused header and just include what you use in codegen
      ab1eda87 Allow setting codegen guc to ON only if code generation is supported by the build
      dcd40712 Use PGFuncGeneratorInfo to codegen pg functions
      83869d1c Replace dynamic_cast with dyn_cast for llvm objects
      23007017 Decide what to generate for ExecEvalExpr based on PlanState
      387d8ce8 Add EXPLAIN CODEGEN to print generated IR to the client
      c4a9bd27 Introduce Datum to cpp cast, cpp type to Datum cast  and normal cast.(#944)
      66158dfd Record external function names for useful debugging
      adab9120 Support variable length attributes in SlotGetAttrCodegen.
      335e09aa Proclaim that the codegen'ed version of generated functions are called in debug build
      50fd9140 Fix cpplint errors
      88a04412 Use ExprTreeGeneratorInfo for expression tree generation.
      3b4af3bb Split code generation of ExecVariableList from slot_getattr
      8cd9ed9f Support <= operator for date/timestamp data types and some minor refactors.
      e4dccf46 Implement InlineFunction to force inline at call site
      71170942 Mock postmaster.o for codegen_framework_unittest.t
      09f00581 Codegen expressions that contain plus, minus and mul operators on float8 data types
      d7fb2f6d Fix codegen unittests on Linux and various compiler warnings while building codegen.
      45f2aa96 Fix test and update coding style This closes #874
      1b26fbfc Enrolled targetlist for scan and aggregate
      ebd1d014 Enhance codegen framework to support arbitrary expr tree
      ec626ce6 Generate and enroll naive ExecEvalExpr in Scan's quals
      1186001e Revert "Create naive code-generated version of ExecQual"
      6f928a65 Replace RegisterExternalFunction with GetOrRegisterExternalFunction using an unordered_map in codegen_utils
      6ae0085b Move ElogWrapper to GpCodegenUtils.
      d3f80b45 Add verifyfunction for generated llvm function.
      7bcf094a Fix codegen compiler error with 8.3 merge
      aae0ad3d Create naive code-generated version of ExecQual
      dce266ad Minor code quality fixes in src/backend/codegen
      d281f340 Support null attributes in code generated ExecVariableList
      82fd418e Address a number of cpplint errors in codegen_utils_unittest.cc
      887aa48d Add check for CodegenUtils::GetType for bool arrays
      bb9b92c6 Enhance Base Codegen to do clean up when generation fails
      b9ef5e3f Fix build error for Annotated types
      a5cfefd9 Add support for array types in codegen_utils.
      2b883384 Fix static_assert call
      7b75d9ea This commit  generates code for code path: ExecVariableList > slot_getattr > _slot_getsomeattrs > slot_deform_tuple. This code path is executed during scan in simple select queries that do not have a where clause (e.g., select bar from foo;).
      6d0a06e8 Fix CodeGen typos and CodeGeneratorManagerCreate function signature in gpcodegen_mock.c
      4916a606 Add support for registering vararg external functions with codegen utils.
      ae4a7754 Integrate codegen framework and make simple external call to slot deform tuple. This closes #649
      ee5fb851 Renaming code_generator to codegen_utils and CodeGenerator to CodegenUtils. This closes #648
      88e9baba Adding GPDB code generation utils
      Signed-off-by: NJesse Zhang <sbjesse@gmail.com>
      Signed-off-by: NMelanie Plageman <mplageman@pivotal.io>
      Signed-off-by: NSambitesh Dash <sdash@pivotal.io>
      fa65063d
  7. 30 11月, 2017 1 次提交
  8. 16 8月, 2017 1 次提交
    • J
      Add pg_regress --exclude-tests option · c1417c9e
      Jimmy Yih 提交于
      When running pg_regress, sometimes you may want to exclude certain
      tests from your schedule file from running. Before, you would have to
      modify the schedule file to comment/ignore out the unwanted test. Now
      we can do it from command line with --exclude-tests option that is
      space and comma delimited.
      
      Example:
      ./pg_regress --exclude-tests="test1 test2,test3 ... testN"
      
      Authors: Abhijit Subramanya and Jimmy Yih
      c1417c9e
  9. 14 8月, 2017 1 次提交
    • N
      Make ICW pass when resgroup is enabled. · e1eed831
      Ning Yu 提交于
      * resgroup: increase max slots for isolation tests.
      * ICW: ignore resgroup related warnings.
      * ICW: try to load resgroup variant of answers when resgroup enabled.
      * ICW: provide resgroup variant of answers.
      * ICW: check whether resqueue is enabled in UDF.
      * ICR: substitude usrname in gpconfig output.
      * ICR: explicitly set max_connections.
      * isolation2: increase resgroup concurrency for max_concurrency tests.
      e1eed831
  10. 10 8月, 2017 1 次提交
    • P
      Organize all resgroup tests to the same directory · d837c305
      Pengzhou Tang 提交于
      resource group tests are messing up isolation2 directory, this commits
      move them all to the same directory to be tidy and organized, it also
      handle the sub directory in input/output directory for resgroup.
      d837c305
  11. 31 7月, 2017 1 次提交
  12. 25 5月, 2017 1 次提交
    • D
      Move gpmapreduce tests from src/test/regress to gpAux · d65a54c6
      Daniel Gustafsson 提交于
      The gpmapreduce application is an optional install included via
      the --enable-mapreduce configure option. The tests were however
      still in src/test/regress and unconditionally included in the
      ICW schedule, thus causing test failures when mapreduce wasn't
      configured.
      
      Move all gpmapreduce tests to co-locate them with the mapreduce
      code and only test when configured.
      
      Also, add a dependency on Perl for gpmapreduce in autoconf since
      it's a required component.
      d65a54c6
  13. 23 5月, 2017 1 次提交
    • A
      pg_regress: converted files should be placed in `outputdir` · 82a19977
      Adam Lee 提交于
      `outputdir` here is where to place the converted files, not the
      directory named `output`. PostgreSQL places them into `outputdir`
      rightly.
      
          commit 64cdbbc4
          Author: Peter Eisentraut <peter_e@gmx.net>
          Date:   Sat Feb 14 21:33:41 2015 -0500
      
              pg_regress: Write processed input/*.source into output dir
      
              Before, it was writing the processed files into the input directory,
              which is incorrect in a vpath build.
      82a19977
  14. 05 4月, 2017 1 次提交
  15. 23 2月, 2017 1 次提交
    • H
      Move UAOCS isolation tests to the new isolation2 test suite. · f6215119
      Heikki Linnakangas 提交于
      These are the same tests queries for column-oriented append-only tables,
      as those moved by commit 11a5a807, for row-oriented append-only tables.
      There were two additional tests that were never executed for row-oriented
      tables though: phantom_reads_update_serializable and
      phantom_reads_delete_serializable. I believe that was an oversight in the
      original test suite; they are now also executed for row-oriented tables.
      
      We use the UAO templating mechanism, to run the same test files against
      row- and column-oriented tables. To make that work, fix a bug in the
      templating mechanism pg_regress.c: if the --ao-dir argument was shorter
      than 7 characters, the uao directory was not detected correctly.
      f6215119
  16. 18 1月, 2017 1 次提交
    • A
      Generate UAO row and column tests from a single .source file · 041dd8a9
      Asim R P 提交于
      This allows writing only one .source file for a UAO test.  Create the
      .source file in "input/uao*/" directory.  Place the answer file, also
      named as .source, into corresponding "output/uao*/" directory.  The
      .source files must contain the following header:
      
         create schema <filename_prefix>@orientation@;
         set search_path="$user",<filename_prefix>@orientation@,public;
         SET gp_default_storage_options='orientation=@orientation@';
      
      Replace "<filename_prefix>" with the filename excluding the ".source"
      extension.
      
      Generated files are named as <filename_prefix>_row.sql and
      <filename_prefix>_column.sql.  Add the generated filenames to schedule
      files and run pg_regress as usual.
      
      A new option "--ao-dir" is added to pg_regress.  To enable row/column test
      generation, set it to the directory name containing generic UAO .source tests.
      The directory should be created under src/test/regress/input.
      041dd8a9
  17. 28 10月, 2016 2 次提交
    • D
      Use format string in gettext macro invocation · fa337f1f
      Daniel Gustafsson 提交于
      Commit 96f22dac expanded the feature check to handle more than just ORCA
      but when moving to using passed in string variables for printing on/off
      it generates a clang compiler warning on -Wformat-security:
      
        warning: format string is not a string literal (potentially insecure)
      
      Move to using format strings rather than just passing the string variable
      to fix the warning and also avoid any theoretical issues with the passed
      string.
      fa337f1f
    • D
      Misc fixes to check_feature_status() to handle cleanup and truncation · 277d7bdb
      Daniel Gustafsson 提交于
      This is a collection of small fixes to check_feature_status() that
      fell out when fixing a compiler warning in the code. The fixes are
      (listed in no specific order):
      
        * Print tuples only in SHOW <feature>; command since we know there
          is little point in reading the header rows when we're just hunting
      	for the on/off
        * Move to const char arguments since this function has no business
          altering the input
        * Explicitly clean up temporary files from feature checking and
          remove them from .gitignore files to avoid littering the tree
        * Check for overflow in command generation since we are appending
          a string with a theoretical limit of MAXPGPATH onto a string
      	with MAXPGPATH size combined with additional content thus
      	risking a truncation. Also fix a minor related style issue to
      	match the rest of the file
      277d7bdb
  18. 13 10月, 2016 1 次提交
  19. 13 5月, 2016 2 次提交
  20. 19 1月, 2016 1 次提交
  21. 14 12月, 2015 1 次提交
  22. 05 12月, 2015 1 次提交
    • A
      Fix pg_regress to only ignore NOTICES specified by the init_file. · 29cccef6
      Abhijit Subramanya 提交于
      pg_regress uses a tool called gpdiff.pl in order to compare diffs between
      expected and actual result files in installcheck-good. pg_regress was hard
      coded to always invoke gpdiff.pl to ignore NOTICE statements. Instead it would
      be better to selectively ignore some NOTICE statements which are harmless and
      which show up very often and compare the rest. This patch causes pg_regress to
      invoke gpdiff.pl with an init_file which contains patterns that are to be
      ignored.
      29cccef6
  23. 16 11月, 2015 1 次提交
    • Y
      put gpfdist test code with source code · 87391c26
      Yandong Yao 提交于
      Move gpfdist regress cases 'exttab1' and 'custom_format' to extension/gpfdist
      directory.
      
      Enhance pg_regress to call needed perl scripts from correct directory.
      87391c26
  24. 28 10月, 2015 1 次提交
  25. 07 5月, 2014 1 次提交
    • B
      pgindent run for 9.4 · 0a783200
      Bruce Momjian 提交于
      This includes removing tabs after periods in C comments, which was
      applied to back branches, so this change should not effect backpatching.
      0a783200
  26. 05 5月, 2014 1 次提交
    • H
      Replace SYSTEMQUOTEs with Windows-specific wrapper functions. · a692ee58
      Heikki Linnakangas 提交于
      It's easy to forget using SYSTEMQUOTEs when constructing command strings
      for system() or popen(). Even if we fix all the places missing it now, it is
      bound to be forgotten again in the future. Introduce wrapper functions that
      do the the extra quoting for you, and get rid of SYSTEMQUOTEs in all the
      callers.
      
      We previosly used SYSTEMQUOTEs in all the hard-coded command strings, and
      this doesn't change the behavior of those. But user-supplied commands, like
      archive_command, restore_command, COPY TO/FROM PROGRAM calls, as well as
      pgbench's \shell, will now gain an extra pair of quotes. That is desirable,
      but if you have existing scripts or config files that include an extra
      pair of quotes, those might need to be adjusted.
      
      Reviewed by Amit Kapila and Tom Lane
      a692ee58
  27. 05 4月, 2014 1 次提交
    • T
      Make sure -D is an absolute path when starting server on Windows. · 9aca5125
      Tom Lane 提交于
      This is needed because Windows services may get started with a different
      current directory than where pg_ctl is executed.  We want relative -D
      paths to be interpreted relative to pg_ctl's CWD, similarly to what
      happens on other platforms.
      
      In support of this, move the backend's make_absolute_path() function
      into src/port/path.c (where it probably should have been long since)
      and get rid of the rather inferior version in pg_regress.
      
      Kumar Rajeev Rastogi, reviewed by MauMau
      9aca5125
  28. 29 3月, 2014 2 次提交
    • N
      Revert "Secure Unix-domain sockets of "make check" temporary clusters." · 8f5578d0
      Noah Misch 提交于
      About half of the buildfarm members use too-long directory names,
      strongly suggesting that this approach is a dead end.
      8f5578d0
    • N
      Secure Unix-domain sockets of "make check" temporary clusters. · 31c6e54e
      Noah Misch 提交于
      Any OS user able to access the socket can connect as the bootstrap
      superuser and in turn execute arbitrary code as the OS user running the
      test.  Protect against that by placing the socket in the temporary data
      directory, which has mode 0700 thanks to initdb.  Back-patch to 8.4 (all
      supported versions).  The hazard remains wherever the temporary cluster
      accepts TCP connections, notably on Windows.
      
      Attempts to run "make check" from a directory with a long name will now
      fail.  An alternative not sharing that problem was to place the socket
      in a subdirectory of /tmp, but that is only secure if /tmp is sticky.
      The PG_REGRESS_SOCK_DIR environment variable is available as a
      workaround when testing from long directory paths.
      
      As a convenient side effect, this lets testing proceed smoothly in
      builds that override DEFAULT_PGSOCKET_DIR.  Popular non-default values
      like /var/run/postgresql are often unwritable to the build user.
      
      Security: CVE-2014-0067
      31c6e54e
  29. 13 3月, 2014 1 次提交
  30. 04 3月, 2014 1 次提交
  31. 03 3月, 2014 1 次提交
    • S
      Another round of Coverity fixes · 5592ebac
      Stephen Frost 提交于
      Additional non-security issues/improvements spotted by Coverity.
      
      In backend/libpq, no sense trying to protect against port->hba being
      NULL after we've already dereferenced it in the switch() statement.
      
      Prevent against possible overflow due to 32bit arithmitic in
      basebackup throttling (not yet released, so no security concern).
      
      Remove nonsensical check of array pointer against NULL in procarray.c,
      looks to be a holdover from 9.1 and earlier when there were pointers
      being used but now it's just an array.
      
      Remove pointer check-against-NULL in tsearch/spell.c as we had already
      dereferenced it above (in the strcmp()).
      
      Remove dead code from adt/orderedsetaggs.c, isnull is checked
      immediately after each tuplesort_getdatum() call and if true we return,
      so no point checking it again down at the bottom.
      
      Remove recently added minor error-condition memory leak in pg_regress.
      5592ebac
  32. 02 3月, 2014 1 次提交
    • S
      Various Coverity-spotted fixes · b1aebbb6
      Stephen Frost 提交于
      A number of issues were identified by the Coverity scanner and are
      addressed in this patch.  None of these appear to be security issues
      and many are mostly cosmetic changes.
      
      Short comments for each of the changes follows.
      
      Correct the semi-colon placement in be-secure.c regarding SSL retries.
      Remove a useless comparison-to-NULL in proc.c (value is dereferenced
        prior to this check and therefore can't be NULL).
      Add checking of chmod() return values to initdb.
      Fix a couple minor memory leaks in initdb.
      Fix memory leak in pg_ctl- involves free'ing the config file contents.
      Use an int to capture fgetc() return instead of an enum in pg_dump.
      Fix minor memory leaks in pg_dump.
        (note minor change to convertOperatorReference()'s API)
      Check fclose()/remove() return codes in psql.
      Check fstat(), find_my_exec() return codes in psql.
      Various ECPG memory leak fixes.
      Check find_my_exec() return in ECPG.
      Explicitly ignore pqFlush return in libpq error-path.
      Change PQfnumber() to avoid doing an strdup() when no changes required.
      Remove a few useless check-against-NULL's (value deref'd beforehand).
      Check rmtree(), malloc() results in pg_regress.
      Also check get_alternative_expectfile() return in pg_regress.
      b1aebbb6
  33. 18 2月, 2014 1 次提交
    • T
      Prevent potential overruns of fixed-size buffers. · 01824385
      Tom Lane 提交于
      Coverity identified a number of places in which it couldn't prove that a
      string being copied into a fixed-size buffer would fit.  We believe that
      most, perhaps all of these are in fact safe, or are copying data that is
      coming from a trusted source so that any overrun is not really a security
      issue.  Nonetheless it seems prudent to forestall any risk by using
      strlcpy() and similar functions.
      
      Fixes by Peter Eisentraut and Jozef Mlich based on Coverity reports.
      
      In addition, fix a potential null-pointer-dereference crash in
      contrib/chkpass.  The crypt(3) function is defined to return NULL on
      failure, but chkpass.c didn't check for that before using the result.
      The main practical case in which this could be an issue is if libc is
      configured to refuse to execute unapproved hashing algorithms (e.g.,
      "FIPS mode").  This ideally should've been a separate commit, but
      since it touches code adjacent to one of the buffer overrun changes,
      I included it in this commit to avoid last-minute merge issues.
      This issue was reported by Honza Horak.
      
      Security: CVE-2014-0065 for buffer overruns, CVE-2014-0066 for crypt()
      01824385
  34. 08 1月, 2014 1 次提交
  35. 13 11月, 2013 1 次提交
    • K
      Free ignorelist after each regression test schedule. · fe67d252
      Kevin Grittner 提交于
      It's a trivial amount of RAM held until the end of the regression
      test run; but it's probably worth fixing to silence future warnings
      from code analyzers.
      
      This was the only memory leak pointed out by clang's static code
      analysis tool.
      fe67d252
  36. 09 11月, 2013 1 次提交