Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 00/43] Unhide symbols
Date: Sun, 12 Apr 2020 14:34:23 +0300	[thread overview]
Message-ID: <20200412113423.GA28681@atlas> (raw)
In-Reply-To: <cover.1586650013.git.v.shpilevoy@tarantool.org>

* Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [20/04/12 14:24]:


> The patchset makes Tarantool stop hiding not explicitly exported
> symbols.
> 
> It means, all FFI and public C API related symbols are still
> always exported. All the other symbols may be exported, or may be
> not.
> 
> That feature was requested solely by Mons.

:-(


> To make the needed symbols visible the hack with function
> addresses was returned back, like it was before
> https://github.com/tarantool/tarantool/commit/4c4c1ccbe422e1420ce0c0b36194fc61bb857ed4,
> but in a more structured form.

The exports used to be autogenerated. Instead, you introduce
a manually crafted list. This upsets the whole idea: 
exporting everything was used in a hypothetical emergency case
when it's necessary to access some production version internals.

This included all symbols - global variables, functions.

With your patch, the manual exports will quickly get out of date
and will be useless in practice (little to no chance the needed
symbol is explicitly exported).

This is good, actually, I hope in a year or two Mons will realize
he was abusing his influence/power and the patch will finally be
deleted.

> 
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-2971-symbols
> Issue: https://github.com/tarantool/tarantool/issues/2971
> 
> Vladislav Shpilevoy (43):
>   cmake: remove double usage of some source files
>   cmake: remove dynamic-list linker option
>   build: export src/lib/core/clock.c symbols
>   build: export src/scramble.c symbols
>   build: export src/lua/socket.c symbols
>   build: export third_party/base64.c symbols
>   build: export src/lua/digest.c symbols
>   build: export src/lib/salad/guava.c symbols
>   build: export src/lib/core/random.c symbols
>   build: export src/lib/core/fiber.c symbols
>   build: export src/lua/init.c symbols
>   build: export src/lib/core/port.c symbols
>   build: export src/lib/csv/csv.c symbols
>   build: export src/title.c symbols
>   build: export src/lua/tnt_iconv.c symbols
>   build: export src/lib/core/exception.cc symbols
>   build: export src/lib/uuid/tt_uuid.c symbols
>   build: export src/lib/core/say.c symbols
>   build: export src/lib/uri/uri.c symbols
>   build: export third_party/PMurHash.c symbols
>   build: export src/crc32.c symbols
>   build: export src/lua/msgpack.c symbols
>   build: export src/main.cc symbols
>   build: export src/box/space.c symbols
>   build: export src/box/schema.cc symbols
>   build: export src/lib/crypto/crypto.c symbols
>   build: export src/lua/buffer.c symbols
>   build: export src/lib/swim/swim.c symbols
>   build: export src/lib/core/fiber_cond.c symbols
>   build: export src/lib/core/coio.cc symbols
>   build: export src/lua/utils.c symbols
>   build: export src/box/lua/tuple.c symbols
>   build: export src/lua/error.c symbols
>   build: export src/box/txn.c symbols
>   build: export src/box/key_def.c symbols
>   build: export src/box/tuple.c symbols
>   build: export src/box/index.cc symbols
>   build: export src/box/box.cc symbols
>   build: export src/box/error.cc symbols
>   build: export src/lib/core/diag.c symbols
>   build: export src/lib/core/latch.c symbols
>   build: export src/lua/string.c symbols
>   build: export public Lua symbols
> 
>  .gitignore                                  |   1 -
>  extra/exports                               | 398 --------------------
>  src/CMakeLists.txt                          |  57 +--
>  src/box/CMakeLists.txt                      |   7 +-
>  src/box/box.cc                              |  22 ++
>  src/box/error.cc                            |  14 +
>  src/box/index.cc                            |  19 +
>  src/box/key_def.c                           |  12 +
>  src/box/lua/init.c                          |  12 +
>  src/box/lua/tuple.c                         |  11 +
>  src/box/schema.cc                           |   9 +
>  src/box/space.c                             |  10 +
>  src/box/tuple.c                             |  28 ++
>  src/box/txn.c                               |  16 +
>  src/crc32.c                                 |   9 +
>  src/exports.c                               | 126 +++++++
>  src/lib/core/clock.c                        |  16 +
>  src/lib/core/coio.cc                        |  12 +
>  src/lib/core/diag.c                         |   8 +
>  src/lib/core/exception.cc                   |  10 +
>  src/lib/core/fiber.c                        |  30 ++
>  src/lib/core/fiber_cond.c                   |  14 +
>  src/lib/core/latch.c                        |  13 +
>  src/lib/core/port.c                         |   9 +
>  src/lib/core/random.c                       |   9 +
>  src/lib/core/say.c                          |  16 +
>  src/lib/crypto/crypto.c                     |  17 +
>  src/lib/csv/csv.c                           |  15 +
>  src/lib/salad/guava.c                       |   9 +
>  src/lib/small                               |   2 +-
>  src/lib/swim/swim.c                         |  32 ++
>  src/lib/uri/uri.c                           |  10 +
>  src/lib/uuid/tt_uuid.c                      |  15 +
>  src/lua/buffer.c                            |  14 +
>  src/lua/digest.c                            |   9 +
>  src/lua/error.c                             |   9 +
>  src/lua/init.c                              | 201 ++++++++++
>  src/lua/msgpack.c                           |  17 +
>  src/lua/socket.c                            |  10 +
>  src/lua/string.c                            |   9 +
>  src/lua/tnt_iconv.c                         |  11 +
>  src/lua/utils.c                             |  24 ++
>  src/main.cc                                 |  15 +
>  src/scramble.c                              |   9 +
>  src/title.c                                 |  18 +
>  test/box/gh-2971-symbol-visibility.result   |  22 ++
>  test/box/gh-2971-symbol-visibility.test.lua |  14 +
>  third_party/PMurHash.c                      |  11 +
>  third_party/base64.c                        |  11 +
>  49 files changed, 938 insertions(+), 454 deletions(-)
>  delete mode 100644 extra/exports
>  create mode 100644 src/exports.c
>  create mode 100644 test/box/gh-2971-symbol-visibility.result
>  create mode 100644 test/box/gh-2971-symbol-visibility.test.lua
> 
> -- 
> 2.21.1 (Apple Git-122.3)

-- 
Konstantin Osipov, Moscow, Russia

  parent reply	other threads:[~2020-04-12 11:34 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12  0:12 Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 01/43] cmake: remove double usage of some source files Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 10/43] build: export src/lib/core/fiber.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 11/43] build: export src/lua/init.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 12/43] build: export src/lib/core/port.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 13/43] build: export src/lib/csv/csv.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 14/43] build: export src/title.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 15/43] build: export src/lua/tnt_iconv.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 16/43] build: export src/lib/core/exception.cc symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 17/43] build: export src/lib/uuid/tt_uuid.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 18/43] build: export src/lib/core/say.c symbols Vladislav Shpilevoy
2020-04-12  0:12 ` [Tarantool-patches] [PATCH 19/43] build: export src/lib/uri/uri.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 02/43] cmake: remove dynamic-list linker option Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 20/43] build: export third_party/PMurHash.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 21/43] build: export src/crc32.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 22/43] build: export src/lua/msgpack.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 23/43] build: export src/main.cc symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 24/43] build: export src/box/space.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 25/43] build: export src/box/schema.cc symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 26/43] build: export src/lib/crypto/crypto.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 27/43] build: export src/lua/buffer.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 28/43] build: export src/lib/swim/swim.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 29/43] build: export src/lib/core/fiber_cond.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 03/43] build: export src/lib/core/clock.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 30/43] build: export src/lib/core/coio.cc symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 31/43] build: export src/lua/utils.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 32/43] build: export src/box/lua/tuple.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 33/43] build: export src/lua/error.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 34/43] build: export src/box/txn.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 35/43] build: export src/box/key_def.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 36/43] build: export src/box/tuple.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 37/43] build: export src/box/index.cc symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 38/43] build: export src/box/box.cc symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 39/43] build: export src/box/error.cc symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 04/43] build: export src/scramble.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 40/43] build: export src/lib/core/diag.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 41/43] build: export src/lib/core/latch.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 42/43] build: export src/lua/string.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 43/43] build: export public Lua symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 05/43] build: export src/lua/socket.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 06/43] build: export third_party/base64.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 07/43] build: export src/lua/digest.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 08/43] build: export src/lib/salad/guava.c symbols Vladislav Shpilevoy
2020-04-12  0:13 ` [Tarantool-patches] [PATCH 09/43] build: export src/lib/core/random.c symbols Vladislav Shpilevoy
2020-04-14 18:14   ` Timur Safin
2020-04-12 11:34 ` Konstantin Osipov [this message]
2020-04-12 14:05   ` [Tarantool-patches] [PATCH 00/43] Unhide symbols Vladislav Shpilevoy
2020-04-13  9:40     ` Konstantin Osipov
2020-04-13  9:42       ` Konstantin Osipov
2020-04-13 13:53         ` Vladislav Shpilevoy
2020-04-13 14:15           ` Konstantin Osipov
2020-04-13 14:21             ` Vladislav Shpilevoy
2020-04-13 19:49           ` Sergey Ostanevich
2020-04-13 21:01             ` Vladislav Shpilevoy
2020-04-13 21:38               ` Konstantin Osipov
2020-04-14 18:01                 ` Timur Safin
2020-04-14 18:26                   ` Timur Safin
2020-04-14 20:41                   ` 'Konstantin Osipov'
2020-04-15 10:28                     ` Mons Anderson
2020-04-15 10:40                     ` Mons Anderson
2020-04-15 10:50                       ` sergos
2020-04-15 21:58                         ` Vladislav Shpilevoy
2020-04-16 12:13                           ` Cyrill Gorcunov
2020-04-16 20:30                             ` Vladislav Shpilevoy
2020-04-17  7:48                               ` Timur Safin
2020-04-17  8:29                               ` Cyrill Gorcunov
2020-04-15 11:27                       ` Konstantin Osipov
2020-04-12 14:25 ` Vladislav Shpilevoy
2020-04-12 20:18 ` Vladislav Shpilevoy
2020-04-13 14:26 ` Vladislav Shpilevoy
2020-04-13 16:44   ` Cyrill Gorcunov
2020-04-13 17:57     ` Vladislav Shpilevoy
2020-04-13 18:17       ` Cyrill Gorcunov
2020-04-14  1:15 ` Vladislav Shpilevoy
2020-04-14  1:27 ` [Tarantool-patches] [PATCH 44/43] build: export src/box/lua/console.c symbols Vladislav Shpilevoy
2020-04-15 23:15 ` [Tarantool-patches] [PATCH 00/43] Unhide symbols Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200412113423.GA28681@atlas \
    --to=kostja.osipov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 00/43] Unhide symbols' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox