• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 17468
83%
master: 88%

Build:
Build:
LAST BUILD BRANCH: ninarodicova/vdbe4
DEFAULT BRANCH: master
Ran 18 Jun 2019 06:56PM UTC
Jobs 1
Files 305
Run time 30s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
17468

push

travis-ci

locker
<a href="https://github.com/tarantool/tarantool/commit/<a class=hub.com/tarantool/tarantool/commit/ed05029685ca3a1dec79bbf7a0df03fda3136b09">ed0502968<a href="https://github.com/tarantool/tarantool/commit/ed05029685ca3a1dec79bbf7a0df03fda3136b09">&quot;&gt;lua: escape trigraphs in bundled lua sources

Built-in modules are bundled into tarantool in the following way. A lua
file from src/lua or src/box/lua is stored as a string literal in a C
file, then built and linked into tarantool. During startup tarantool
calls luaL_loadbuffer() on this string.

When a Lua source is converted to a C literal, proper escaping is
performed. However there is one case, which was not covered: trigraphs.
The patch adds escaping of question mark symbols to avoid matching ??X
sequences as trigraphs by C preprocessor.

The most simple way to check that it works is to apply the following
patch:

 | diff --git a/src/lua/string.lua b/src/lua/string.lua
 | index 6e12c59ae..2da2dbf4d 100644
 | --- a/src/lua/string.lua
 | +++ b/src/lua/string.lua
 | @@ -425,3 +425,6 @@ string.fromhex    = string_fromhex
 |  string.strip      = string_strip
 |  string.lstrip      = string_lstrip
 |  string.rstrip      = string_rstrip
 | +string.foo = function()
 | +    return &amp;#39;??(&amp;#39;
 | +end

And call the function like so:

 | ./src/tarantool -e &amp;#39;print(string.foo()) os.exit()&amp;#39;

If it printfs `??(`, then everything is okay. If it prints `[`, then
`??(` was preprocessed as the trigraph.

We hit this problem when tried to bundle luarocks-3: it contains
&amp;quot;^(.-)(%??)$&amp;quot; regexp, where `??)` was interpreted as `]`. Debug build or
a build with -DENABLE_WERROR reports an error in the case, but usual
RelWithDebInfo build passes (with -Wtrigraphs warnings) and can show
this unexpected behaviour.

Fixes #4291.

(cherry picked from commit </a><a class="double-link" href="https://github.com/tarantool/tarantool/commit/<a class="double-link" href="https://github.com/tarantool/tarantool/commit/177a1713f4a5c03d3193785fb68690a5e4e6e241">177a1713f</a>">177a1713f</a><a href="https://github.com/tarantool/tarantool/commit/ed05029685ca3a1dec79bbf7a0df03fda3136b09">)

41517 of 50410 relevant lines covered (82.36%)

848875.05 hits per line

Jobs
ID Job ID Ran Files Coverage
5 17468.5 (TARGET=coverage) 18 Jun 2019 06:56PM UTC 0
82.36
Travis Job 17468.5
Source Files on build 17468
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #17468
  • ed050296 on github
  • Prev Build on 1.10 (#17463)
  • Next Build on 1.10 (#17579)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc