Skip to content
Snippets Groups Projects
  1. Dec 31, 2019
    • Kirill Yukhin's avatar
      Dummy commit · 4a48a61a
      Kirill Yukhin authored
      4a48a61a
    • Alexander Turenko's avatar
      test: update test-run · 0a577ff3
      Alexander Turenko authored
      * Support to set default SQL engine using _session_settings space in
        addition to pragma sql_default_engine. This feature is only for
        *.test.sql tests. Needed for #4511.
      
      * Use exact IPv4/IPv6 address in test_run:cmd() in order to avoid rare
        failures due to using wrong address (PR #197).
      
      (cherry picked from commit a6535ab3b8d3e395d2f81699cf35329118412307)
  2. Dec 30, 2019
    • Nikita Pettik's avatar
      sql: fix off-by-one error in QP · feca08c9
      Nikita Pettik authored
      In scope of 8fac6972 it was fixed misbehavior while passing floating
      point values to integer iterator. Unfortunately, that patch introduced
      off-by-one error. Number of constraints (equalities and inequalities)
      can not be greater than number of key parts (obviously, each constraint
      can be tested against at most one index part). Inequality constraint can
      involve only field representing last key part. To get it number of
      constraints was used as index. However, since array is 0-based, the last
      key part should be calculated as parts[eq_numb - 1]. Before this patch
      it was parts[eq_numb].
      
      Closes #4558
      
      (cherry picked from commit bb905d1d)
      feca08c9
  3. Dec 29, 2019
  4. Dec 27, 2019
    • Nikita Pettik's avatar
      sql: fix index consideration with INDEXED BY clause · 411be0f0
      Nikita Pettik authored
      Accidentally, number of indexes to be considered during query planning
      in presence of INDEXED BY is calculated wrong. Instead of one (INDEXED
      BY is not a hint but requirement) index to be used (which is indicated
      in INDEXED BY clause), all space indexes take part in query planning.
      There are not so many tests checking this feature, so unfortunately this
      bug was hidden. Let's fix it and force only one index to be used in QP
      in case of INDEXED BY clause.
      
      (cherry picked from commit 49fedfe3)
      411be0f0
  5. Dec 23, 2019
    • Ilya Kosarev's avatar
      httpc: handle bad Content-Encoding with curl-7.67.0+ · 7299040d
      Ilya Kosarev authored
      
      libcurl-7.66.0 and older returns CURLE_WRITE_ERROR when a server
      responds with unknown or unsupported Content-Encoding (see [1] and [2]).
      This was fixed in future libcurl-7.67.0 and proper
      CURLE_BAD_CONTENT_ENCODING code will be returned in this case.
      
      We should process the code in the same way as we do for
      CURLE_WRITE_ERROR.
      
      [1]: curl/curl#4310
      [2]: curl/curl#4449
      
      Closes #4579
      
      Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      (cherry picked from commit e3432636)
      Unverified
      7299040d
    • Ilya Kosarev's avatar
      httpc: fix assertion fail after curl write error · 6d73c416
      Ilya Kosarev authored
      
      After executing curl request we need to process curl_request code. It
      might be CURLE_WRITE_ERROR. We had special case for it, which assumed
      diagnostic message being set and contained corresponding assert, though
      it is incorrect. Better way is to handle it as any other non-standard
      event.
      
      It was discovered while adding accept_encoding option. In case of
      unknown encoding curl_request code is currently set to CURLE_WRITE_ERROR
      and therefore we come to an assert assuming we have some diagnostics
      set. However, it is not being set and it is totally fine. This means we
      are failing on assert and it is not correct behavior.
      
      Prerequisites: #4232
      
      Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      (cherry picked from commit 728d08a6)
      Unverified
      6d73c416
  6. Dec 19, 2019
    • Mergen Imeev's avatar
      lua/serializer: encode Lua number -2^63 as integer · da34725c
      Mergen Imeev authored
      This patch fixes a bug that appeared after commit
      3a13be1d ('lua: fix lua_tofield()
      for 2**64 value') .
      
      Due to this bug, -2^63 was serialized as double, although it
      should be serialized as integer.
      
      Closes #4672
      
      (cherry picked from commit 06aeb768)
      da34725c
    • Oleg Babin's avatar
      httpc: consider "verbose" option correctly · 5f3d9015
      Oleg Babin authored
      Before this patch if user passed {verbose = false}
      to http client it was considered as "true"
      
      This patch fixes such behaviour and takes into account
      user's value
      
      (cherry picked from commit 77936721c02a89e17701c64f0f442abdf78ed7fc)
      5f3d9015
  7. Dec 17, 2019
  8. Dec 16, 2019
    • Chris Sosnin's avatar
      build: GCC warning on strncpy · fd753253
      Chris Sosnin authored
      As long as we are sure, that strlen(sd_unix_path) < sizeof(sa.sun_path)
      we can assume that there is always enough space and the path will be
      null-terminated. Thus, copy 1 byte less to get rid of the warning.
      
      Closes #4515
      
      (cherry picked from commit 49fa68a7)
      fd753253
  9. Dec 11, 2019
  10. Dec 10, 2019
    • Vladislav Shpilevoy's avatar
      func: fix not unloading of unused modules · e62e311e
      Vladislav Shpilevoy authored
      C functions are loaded from .so/.dylib dynamic libraries. A
      library is loaded when any function from there is called first
      time. And was supposed to be unloaded, when all its functions are
      dropped from the schema (box.schema.func.drop()), and none of them
      is still in a call. But the unloading part was broken.
      
      In fact, box.schema.func.drop() never unloaded anything. Moreover,
      when functions from the module were added again without a restart,
      it led to a second mmap of the same module. And so on, the same
      library could be loaded any number of times.
      
      The problem was in a useless flag in struct module preventing its
      unloading even when it is totally unused. It is dropped.
      
      Closes #4648
      e62e311e
    • Vladislav Shpilevoy's avatar
      errinj: provide 'get' method in Lua · cb402ba8
      Vladislav Shpilevoy authored
      Error injections are used to simulate an error. They are
      represented as a flag, or a number, and are used in Lua tests. But
      they don't have any feedback. That makes impossible to use the
      injections to check that something has happened. Something very
      needed to be checked, and impossible to check in a different way.
      
      More certainly, the patch is motivated by a necessity to count
      loaded dynamic libraries to ensure, that they are loaded and
      unloaded when expected. This is impossible to do in a platform
      independent way. But an error injection as a debug-only counter
      would solve the problem.
      
      Needed for #4648
      cb402ba8
    • Serge Petrenko's avatar
      backtrace: fix out of bounds access on backtrace printing · 1c6a5df5
      Serge Petrenko authored
      snrpintf always null-terminates the passed string, and it also returns
      the number of bytes that "would have been written if there was enough
      space", so not only we don't have to null-terminate the string, but even
      more so we shouldn't do it erroneously. The only case when a string
      should be null-terminated manually is when the print cycle doesn't run
      at all, so move the termination before the cycle.
      
      Closes #4636
      
      (cherry picked from commit 2066f297)
      1c6a5df5
  11. Dec 06, 2019
    • Chris Sosnin's avatar
      app: increase max recursion depth for encoding/decoding · 5d824d80
      Chris Sosnin authored
      It was requested to be raised from 32 to 128
      
      Closes #4670
      
      (cherry picked from commit a4e514e46ca87242fe9d72e63e0079a1fec24990)
      5d824d80
    • Vladislav Shpilevoy's avatar
      key_def: key_def.new() accept both 'field' and 'fieldno' · 089082a8
      Vladislav Shpilevoy authored
      Closes #4519
      
      @TarantoolBot document
      Title: key_def.new() accept both 'field' and 'fieldno'
      
      Before the patch key_def.new() took an index part
      array as it is returned in <index_object>.parts: each
      part should include 'type', 'fieldno', and what else
      .parts element contains.
      
      But it was not possible to create a key_def from an
      index definition - the array passed to
      <space_object>.create_index() 'parts' argument. Because
      key_def.new() didn't recognize 'field' option. That
      might be useful, when a key_def is needed on a remote
      client, where a space object and its indexes do not
      exist. And it would be strange to force a user to
      create them just so as he would be able to access
      
          <net_box connection>.space.<space_name>.
              index.<index_name>.parts
      
      As well as it would be crutchy to make a user manually
      replace 'field' with 'fieldno' in its index definition
      just to create a key_def.
      
      Additionally, an ability to pass an index definition
      to a key_def constructor makes the API more symmetric.
      
      Note, that it still is not 100% symmetric, because a
      user can't pass field names to the key_def
      constructor. A space is needed for that anyway.
      
      (cherry picked from commit 39918baf)
      089082a8
  12. Dec 05, 2019
    • Vladislav Shpilevoy's avatar
      test: fix flaky box/gh-4627-session-use-after-free · 6e0dbe33
      Vladislav Shpilevoy authored
      The problem was in that the test uses the global trigger
      box.session.on_disconnect() to set a global variable by one
      connection. But test-run can do multiple connects/reconnects to
      the same instance. That led to multiple invocations of
      box.session.on_disconnect(), which could override the global
      variable in unexpected ways and moments.
      
      The patch makes only one session execute that trigger.
      
      Probably related to https://github.com/tarantool/test-run/issues/46
      
      
      Follow up #4627
      
      Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      (cherry picked from commit 9643fdc7)
      Unverified
      6e0dbe33
    • Kirill Yukhin's avatar
      luajit: bump new a new version · 076b1ba0
      Kirill Yukhin authored
      List of changes
           - fold: keep type of emitted CONV in sync with its mode
           - test: adjust the test name related to PAIRSMM flag
      
      (cherry picked from commit e12930d0)
      076b1ba0
    • Olga Arkhangelskaia's avatar
      build: enables LUAJIT_ENABLE_PAIRSMM by default · 9860efa8
      Olga Arkhangelskaia authored
      Turns on LUAJIT_ENABLE_PAIRSMM flag for tarantool build.
      Now __pairs/__ipairs metamethods are available.
      
      Closes #4650
      
      (cherry picked from commit b504ca1a096a839f3a4fddc72a33457a3f0dc700)
      9860efa8
    • Alexander V. Tikhonov's avatar
      build: add Fedora 31 into CI / CD · 2a2d2e9f
      Alexander V. Tikhonov authored
      Added build + test jobs in GitLab-CI and build + test + deploy jobs on
      Travis-CI for Fedora 31.
      
      Updated testing dependencies in the RPM spec to follow the new Python 2
      package naming scheme that was introduced in Fedora 31: it uses
      python2-' prefix rather then 'python-'.
      
      Fedora 31 does not provide python2-gevent and python2-greenlet packages,
      so they were pushed to https://packagecloud.io/packpack/backports
      repository. This repository is enabled in our build image
      (packpack/packpack:fedora-31) by default. Those dependencies are build-time,
      so nothing was changed for a user. The source RPM packages were gathered
      from https://rpms.remirepo.net/rpmphp/
      
      .
      
      Closes #4612
      
      Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      (cherry picked from commit 9e09b07c)
      Unverified
      2a2d2e9f
    • Alexander Turenko's avatar
      test: update test-run · 48905cd4
      Alexander Turenko authored
      Strengthen test_run:cmd() against temporary connection failures (#193).
      
      We recently added 'replication/box_set_replication_stress' test that may
      exceed file descriptor limit. When test_run:cmd() function executes a
      command ('switch master' in the case), it tries to create a new socket
      and connect it to test-run's inspector, but it may fail to do so in the
      case, because of the file descriptor limit.
      
      The sockets that the test produces are closed in background, so if we'll
      keep trying to create and connect a socket we'll succeed once. This is
      exactly that the test-run's patch doing: it fails test_run:cmd()
      function only if a socket cannot be connected during 100 seconds.
      
      I guess that the reason why sockets are not closed immediately is that
      relays wait until replicas will close its side of a socket and only then
      closes its side. Didn't investigate it deeper, to be honest.
      
      (cherry picked from commit 5fccf003)
      Unverified
      48905cd4
  13. Dec 03, 2019
    • Maria's avatar
      json: fix stack-use-after-scope in json_decode() · b0800a46
      Maria authored
      Inside json_decode() struct luaL_serializer is allocated on stack, but
      json context stores pointer to it:
      
         998	static int json_decode(lua_State *l)
         999	{
        ...
        1007	    if (lua_gettop(l) == 2) {
        1008	        struct luaL_serializer user_cfg = *luaL_checkserializer(l);
        1009	        luaL_serializer_parse_options(l, &user_cfg);
        1010	        lua_pop(l, 1);
        1011	        json.cfg = &user_cfg;
        1012      }
      
      Later (for instance in json_decode_descend()), it can be dereferenced
      which in turn results in stack-use-after-scope (object turns into
      garbage right after scope is ended). To fix it let's simply avoid
      allocating and copying luaL_serializer on stack and instead use pointer
      to it.
      
      Bug is found by ASAN: test app-tap/json.test.lua fails with enabled
      ASAN. Current fix allows to pass all tests.
      
      Thanks to @Korablev77 for the initial investigation.
      
      Closes #4637
      
      (cherry picked from commit 6508ddb7)
      b0800a46
  14. Dec 02, 2019
    • Alexander Turenko's avatar
      Revert "test: update test-run" · 758eb1bf
      Alexander Turenko authored
      This reverts commit a0b196dd.
      
      This commit was pushed occasionally and points to a draft commit in
      test-run repository. See also
      https://github.com/tarantool/test-run/issues/195
      
      (cherry picked from commit 4acdeeda)
      Unverified
      758eb1bf
    • Ilya Kosarev's avatar
      test: stabilize quorum test conditions · 79ba2114
      Ilya Kosarev authored
      There were some pass conditions in quorum test which could take some
      time to be satisfied. Now they are wrapped using test_run:wait_cond to
      make the test stable.
      
      Closes #4586
      
      (cherry picked from commit f6775e86)
      79ba2114
    • Ilya Kosarev's avatar
      replication: make anon replicas iteration safe · 3ccd60c8
      Ilya Kosarev authored
      In replicaset_follow we iterate anon replicas list: list of replicas
      that haven't received an UUID. In case of successful connect replica
      link is being removed from anon list. If it happens immediately,
      without yield in applier, iteration breaks. Now it is fixed by
      rlist_foreach_entry_safe instead of common rlist_foreach_entry.
      Relevant test case is added.
      
      Part of #4586
      Closes #4576
      Closes #4440
      
      (cherry picked from commit 6f038f4b)
      3ccd60c8
    • Ilya Kosarev's avatar
      replication: fix appliers pruning · d03cf46d
      Ilya Kosarev authored
      During pruning of appliers some anon replicas might connect
      from replicaset_follow called in another fiber. Therefore we need to
      prune appliers of anon replicas first and, moreover, prune them one by
      one instead of iterating them, as far as any of them might connect
      while we are stopping the other one and it will break iteration.
      
      Part of #4586
      Closes #4643
      
      (cherry picked from commit 36ff3c89)
      d03cf46d
    • Ilya Kosarev's avatar
      test: update test-run · c3b0b795
      Ilya Kosarev authored
      Stabilize tcp_connect in test_run:cmd() (tarantool/test-run#193)
      
      (cherry picked from commit a0b196dd)
      c3b0b795
  15. Nov 26, 2019
    • Vladislav Shpilevoy's avatar
      iproto: don't destroy a session during disconnect · 581f3674
      Vladislav Shpilevoy authored
      Binary session disconnect trigger yield could lead to use after
      free of the session object. That happened because iproto thread
      sent two requests to TX thread at disconnect:
      
          - Close the session and run its on disconnect triggers;
      
          - If all requests are handled, destroy the session.
      
      When a connection is idle, all requests are handled, so both these
      requests are sent. If the first one yielded in TX thread, the
      second one arrived and destroyed the session right under the feet
      of the first one.
      
      This can be solved in two ways - in TX thread, and in iproto
      thread.
      
      Iproto thread solution (which is chosen in the patch): just don't
      send destroy request until disconnect returns back to iproto
      thread.
      
      TX thread solution (alternative): add a flag which says whether
      disconnect is processed by TX. When destroy request arrives, it
      checks the flag. If disconnect is not done, the destroy request
      waits on a condition variable until it is.
      
      The iproto is a bit tricker to implement, but it looks more
      correct.
      
      Closes #4627
      
      (cherry picked from commit 6da9d395)
      581f3674
    • Vladislav Shpilevoy's avatar
      Fix bootstrap.snap corrupted file. · 856662fa
      Vladislav Shpilevoy authored
      Bootstrap.snap is created from a normal snapshot file, but with
      erased VClock option in the header:
      
          SNAP
          0.13
          Version: 2.2.1-122-g1146bb78d
          Instance: 03d3836a-e608-421c-9f8d-ad9beefe7440
          VClock: {}
      
      In a normal snapshot it is 'VClock: {1: ...}'. To erase the option
      usually developers use 'vim'. But when a binary file is opened in
      vim without any arguments, like this:
      
          vim bootstrap.snap
      
      on close it will edit some parts of the file in unexpected ways,
      depending on local vim settings.
      
      To forbid any implicit changes binary mode should be used:
      
          vim -b bootstrap.snap
      
      The patch regenerates bootstrap.snap and drops VClock using binary
      mode vim.
      
      Closes #4510
      856662fa
  16. Nov 22, 2019
    • Kirill Yukhin's avatar
      luajit: bump a new version · 1146bb78
      Kirill Yukhin authored
      Add LUAJIT_ENABLE_PAIRSMM flag as a build option for luajit.
      If the flag is set, pairs/ipairs metamethods are available in
      Lua 5.1.
      For Tarantool this option is enabled by default.
      
      (cherry picked from commit 93e710d5de0d723086bda6fedc9cb383a8e5e477)
      1146bb78
  17. Nov 21, 2019
    • Vladislav Shpilevoy's avatar
      replication: use empty password by default · ab96e7b3
      Vladislav Shpilevoy authored
      Replication's applier encoded an auth request with exactly the
      same parameters as extracted by the URI parser. I.e. when no
      password was specified, the parser returned it as NULL, and it was
      not encoded. The relay, received such an auth request, complained
      that IPROTO_TUPLE field is not specified (this is password).
      
      Such an error confuses - a user didn't do anything illegal, he
      just used URI like 'login@host:port', without a password after the
      login.
      
      The patch makes the applier use an empty string as a default
      password.
      
      An alternative was to force a user always set a password even if
      it is an empty string, like that: 'login:@host:port'. And if a
      password was not found in an auth request, then reject it with a
      password mismatch error. But in that case a URI of kind
      'login@host:port' becomes useless - it can never pass. In
      addition, netbox already uses an empty string as a default
      password. So the only way to make it consistent, and don't break
      anything - repeat netbox logic for replication URIs.
      
      Closes #4605
      
      Conflicts:
      	test/replication/suite.cfg
      
      (cherry picked from commit 6c01ca48)
      
      Conflicts:
      	test/replication/suite.cfg
      ab96e7b3
    • Vladislav Shpilevoy's avatar
      func: fix use after free on function unload · 64f4d06a
      Vladislav Shpilevoy authored
      Functions are stored in lists inside module objects. Module
      objects are stored in a hash table, where key is a package name.
      But the key was a pointer at one of module's function definition
      object. Therefore, when that function was deleted, its freed
      package name memory was still in the hash key, and could be
      accessed, when another function was deleted.
      
      Now module does not use memory of its functions, and keep a copy
      of the package name.
      
      (cherry picked from commit fa2893ea)
      64f4d06a
  18. Nov 15, 2019
  19. Nov 14, 2019
    • Alexander Turenko's avatar
      app/argparse: expect no value for a boolean option · 11675347
      Alexander Turenko authored
      
      Before commit 03f85d4c ('app: fix
      boolean handling in argparse module') the module does not expect a value
      after a 'boolean' argument. However there was the problem: a 'boolean'
      argument can be passed only at end of an argument list, otherwise it
      wrongly consumes a next argument and gives a confusing error message.
      
      The mentioned commit fixes this behaviour in the following way: it still
      allows to pass a 'boolean' argument at end of the list w/o a value, but
      requires a value ('true', 'false', '1', '0') if a 'boolean' argument is
      not at the end to be provided using {'--foo=true'} or {'--foo', 'true'}
      syntax.
      
      Here this behaviour is changed: a 'boolean' argument does not assume an
      explicitly passed value despite its position in an argument list. If a
      'boolean' argument appears in the list, then argparse.parse() returns
      `true` for its value (a list of `true` values in case of 'boolean+'
      argument), otherwise it will not be added to the result.
      
      This change also makes the behaviour of long (--foo) and short (-f)
      'boolean' options consistent.
      
      The motivation of the change is simple: it is easier and more natural to
      type, say, `tarantoolctl cat --show-system 00000000000000000000.snap`
      then `tarantoolctl cat --show-system true 00000000000000000000.snap`.
      
      This commit adds several new test cases, but it does not mean that we
      guarantee that the module behaviour will not be changed around some
      corner cases, say, handling of 'boolean+' arguments. This is internal
      module.
      
      Follows up #4076.
      Reviewed-by: default avatarVladislav Shpilevoy <v.shpilevoy@tarantool.org>
      
      (cherry picked from commit e47f2c91)
      Unverified
      11675347
  20. Nov 12, 2019
    • Vladislav Shpilevoy's avatar
      replication: don't drop admin super privileges · b62c1110
      Vladislav Shpilevoy authored
      The admin user has universal privileges before bootstrap or
      recovery are done. That allows to, for example, bootstrap from a
      remote master, because to do that the admin should be able to
      insert into system spaces, such as _priv.
      
      But after the patch on online credentials update was implemented
      (#2763, 48d00b0e) the admin could
      loose its universal access if, for example, a role was granted to
      him before universal access was recovered.
      
      That happened by two reasons:
      
          - Any change in access rights, even in granted roles, led to
            rebuild of universal access;
      
          - Any change in access rights updated the universal access in
            all existing sessions, thanks to #2763.
      
      What happened: two tarantools were started. One of them master,
      granted 'replication' role to admin. Second node, slave, tried to
      bootstrap from the master. The slave created an admin session and
      started loading data. After it loaded 'grant replication role to
      admin' command, this nullified admin universal access everywhere,
      including this session. Next rows could not be applied.
      
      Closes #4606
      
      (cherry picked from commit 95237ac8)
      b62c1110
  21. Nov 11, 2019
  22. Nov 08, 2019
    • Cyrill Gorcunov's avatar
      box/console: fix abnormal exit after unknown command · 9f1e0009
      Cyrill Gorcunov authored
      
      When invalid command is passed we should send an error message to a
      client. Instead a nil dereference occurs that causes abnormal exit of a
      console.
      
      This is the regression from 96dbc49d
      ('box/console: Refactor command handling').
      
      Reported-by: default avatarMergen Imeev <imeevma@tarantool.org>
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
      Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      (cherry picked from commit ada8c97c)
      Unverified
      9f1e0009
    • Alexander V. Tikhonov's avatar
      build: add CentOS 8 into CI / CD · 289bb2cb
      Alexander V. Tikhonov authored
      Added build + test jobs in GitLab-CI and build + test + deploy jobs on
      Travis-CI for CentOS 8.
      
      Updated testing dependencies in the RPM spec to follow the new Python 2
      package naming scheme that was introduced in CentOS 8: it uses
      'python2-' prefix rather then 'python-'.
      
      CentOS 8 does not provide python2-gevent and python2-greenlet packages,
      so they were pushed to https://packagecloud.io/packpack/backports
      repository. This repository is enabled in our build image
      (packpack/packpack:el-8) by default. Those dependencies are build-time,
      so nothing was changed for a user. The source RPM packages were gathered
      from https://cbs.centos.org
      
      .
      
      Disabled app-tap/pwd.test.lua on CentOS 8 due to systemd-nss issue,
      which was not worked around properly. Filed #4592 to resolved it in the
      future.
      
      Eliminated libunwind runtime dependency (and libunwind-devel build
      dependency) on CentOS 8, because the base system does not provide it.
      fiber.info() backtraces and printing of a backtrace after a crash will
      not be available on this system. Hopefully we'll fix it in the future,
      filed #4611 on this.
      
      Closes #4543
      
      Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      Reviewed-by: default avatarIgor Munkin <imun@tarantool.org>
      (cherry picked from commit e3d9d8c9)
      Unverified
      289bb2cb
    • Alexander Turenko's avatar
      build: don't pass LDFLAGS from environment to curl · 29039cba
      Alexander Turenko authored
      
      After ea5929db ('build: fix OpenSSL
      linking problems on FreeBSD') we set CFLAGS explicitly (possibly to an
      empty value) when invoking a configure script for curl. When this
      parameter is set the script does not use a value of environment variable
      CFLAGS.
      
      Before this commit LDFLAGS environment variable can affect build of curl
      submodule. This can lead to a problem when a user or a tool set CFLAGS
      and LDFLAGS both and some linker flag assumes that some compilation flag
      is present. Here we set empty LDFLAGS explicitly to avoid using of the
      environment variable.
      
      A distributive build tool such as rpmbuild or emerge usually sets CFLAGS
      and LDFLAGS. The problem with incompatible compiler / linker options has
      been reveal under rpmbuild on CentOS 8 with hardened build enabled
      (which is so when backtraces are disabled).
      
      It is not clear whether we should follow environment variables or values
      determined by CMake for CFLAGS, CPPFLAGS and LDFLAGS when building a
      submodule (such as luajit and curl). Let's decide about this later.
      
      Part of #4543.
      
      Reviewed-by: default avatarAlexander V. Tikhonov <avtikhon@tarantool.org>
      Reviewed-by: default avatarIgor Munkin <imun@tarantool.org>
      (cherry picked from commit 0bead600)
      Unverified
      29039cba
Loading