Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • apk-tools apk-tools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 99
    • Issues 99
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 21
    • Merge requests 21
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • alpine
  • apk-toolsapk-tools
  • Issues
  • #10800

Closed
Open
Created Dec 17, 2021 by Daniel Golle@dangowrt

segfault if remote repository cannot be fetched

apk segfaults if fetching a remote repository has failed (e.g. due to HTTP 404 error).

Program received signal SIGSEGV, Segmentation fault.
apk_istream_error (is=is@entry=0xfffffffe, err=err@entry=-2) at ../src/apk_io.h:95
(gdb) bt
#0  apk_istream_error (is=is@entry=0xfffffffe, err=err@entry=-2)
    at ../src/apk_io.h:95
#1  0xb6f5abcc in apk_istream_close_error (r=-2, is=0xfffffffe)
    at ../src/apk_io.h:125
#2  apk_istream_tee (from=0xfffffffe, to=0xb6fef620, flags=0, 
    cb=<optimized out>, cb_ctx=0x0) at ../src/io.c:468
#3  0xb6f53ae8 in apk_cache_download (db=db@entry=0x31740 <db>, 
    repo=repo@entry=0x31824 <db+228>, pkg=0x0, autoupdate=-1090528832, 
    autoupdate@entry=1, cb=0x0, cb_ctx=0x0) at ../src/database.c:669
#4  0xb6f54b6c in apk_repository_update (repo=0x31824 <db+228>, 
    db=0x31740 <db>) at ../src/database.c:2133
#5  apk_db_add_repository (_db=..., _repository=...) at ../src/database.c:2258
#6  0xb6f4cd0c in apk_blob_for_each_segment (blob=..., split=0xbefffbb8 "", 
    cb=0xb6f54838 <apk_db_add_repository>, ctx=ctx@entry=0x31740 <db>)
    at ../src/blob.c:305
#7  0xb6f50780 in add_repos_from_file (ctx=ctx@entry=0x31740 <db>, dirfd=3, 
    file=0xb6f6b1c3 <error reading variable>) at ../src/database.c:1400
#8  0xb6f561bc in apk_db_open (db=db@entry=0x31740 <db>, 
    ac=ac@entry=0x31db0 <ctx>) at ../src/database.c:1668
#9  0x00014414 in main (argc=0, argv=0xbefffe6c) at ../src/apk.c:474
Assignee
Assign to
Time tracking