Uploaded image for project: 'Swift'
  1. Swift
  2. SR-10252

swift build --sanitize=address failed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
      None
    • Environment:

      Swift: 4.2.3
      Linux: Ubuntu 16.04
      Docker Desktop Community: 2.0.0.3
      Vapor: 3.3.0 

      Description

      As describe on swift forum Memory leaking in Vapor app try to build a project with

      swift build --sanitize=address

      Steps to reproduce:

      1. unzip test project (see attach file)

      2. generate linux image with command

      docker-compose build

      3. deploy image on docker swarm 

      docker stack deploy -c docker-compose.yml testproject

      4. attach to the image 

      docker exec -it $(docker ps -q -f name=testproject_ping) /bin/bash

      5. build the project with 

      swift build --sanitize=address

       

      Results:

      Swift build generate this output:

      root@534f8bac79de:/app# swift build --sanitize=address
      Compile CNIOZlib empty.c
      Compile CNIOSHA1 c_nio_sha1.c
      Compile CNIOOpenSSL shims.c
      Compile CNIOOpenSSL helpers.c
      Compile CNIOLinux ifaddrs-android.c
      Compile CNIOLinux shim.c
      Compile Swift Module 'NIOPriorityQueue' (2 sources)
      Compile Swift Module 'Debugging' (3 sources)
      Compile Swift Module 'COperatingSystem' (1 sources)
      Compile CNIOHTTPParser c_nio_http_parser.c
      Compile CNIODarwin shim.c
      Compile CNIOAtomics src/c-atomics.c
      Compile CCryptoOpenSSL shim.c
      Compile CBcrypt blf.c
      Compile CBcrypt bcrypt.c
      Compile CBase32 base32.c
      Compile Swift Module 'NIOConcurrencyHelpers' (2 sources)
      Compile Swift Module 'NIO' (55 sources)
      Compile Swift Module 'NIOTLS' (3 sources)
      Compile Swift Module 'Bits' (12 sources)
      Compile Swift Module 'Async' (15 sources)
      Compile Swift Module 'NIOFoundationCompat' (1 sources)
      Compile Swift Module 'NIOHTTP1' (9 sources)
      Compile Swift Module 'NIOOpenSSL' (17 sources)
      Compile Swift Module 'Random' (4 sources)
      Compile Swift Module 'Core' (25 sources)
      Compile Swift Module 'NIOWebSocket' (9 sources)
      Compile Swift Module 'Logging' (4 sources)
      Compile Swift Module 'Multipart' (8 sources)
      Compile Swift Module 'URLEncodedForm' (8 sources)
      Compile Swift Module 'Service' (20 sources)
      Compile Swift Module 'HTTP' (26 sources)
      Compile Swift Module 'Validation' (18 sources)
      Compile Swift Module 'Crypto' (19 sources)
      Compile Swift Module 'Routing' (12 sources)
      Compile Swift Module 'DatabaseKit' (30 sources)
      Compile Swift Module 'TemplateKit' (41 sources)
      Compile Swift Module 'Console' (28 sources)
      Compile Swift Module 'WebSocket' (6 sources)
      Compile Swift Module 'Command' (16 sources)
      Compile Swift Module 'Vapor' (75 sources)
      Compile Swift Module 'App' (4 sources)
      Compile Swift Module 'Run' (1 sources)
      Linking ./.build/x86_64-unknown-linux/debug/Run
      /app/.build/checkouts/crypto.git-1444389797943994899/Sources/CBase32/base32.c:95: error: undefined reference to '__asan_version_mismatch_check_v6'
      /app/.build/checkouts/crypto.git-1444389797943994899/Sources/CBcrypt/bcrypt.c:260: error: undefined reference to '__asan_version_mismatch_check_v6'
      /app/.build/checkouts/crypto.git-1444389797943994899/Sources/CBcrypt/blf.c:657: error: undefined reference to '__asan_version_mismatch_check_v6'
      /app/.build/checkouts/crypto.git-1444389797943994899/Sources/CCryptoOpenSSL/shim.c:29: error: undefined reference to '__asan_version_mismatch_check_v6'
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
      error: terminated(1): /usr/bin/swift-build-tool -f /app/.build/debug.yaml main output:

      Expected results:

      Build the project without errors

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Tof Christophe Braud
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: