mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-01 16:58:05 +00:00
Fix out-of-bounds error when no threads were needed for a zoom level
This commit is contained in:
parent
eb966ae398
commit
e07a4dd51b
@ -43,7 +43,7 @@ matrix:
|
|||||||
# debug+leak+address-sanitizer build
|
# debug+leak+address-sanitizer build
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: CLANG_VERSION='3.8.0' BUILDTYPE=Debug ASAN_OPTIONS=detect_leaks=1 CC="clang-3.8" CXX="clang++-3.8" CXXFLAGS="-fsanitize=address" CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address" FEWER=true
|
env: CLANG_VERSION='3.8.0' BUILDTYPE=Debug ASAN_OPTIONS=detect_leaks=1 CC="clang-3.8" CXX="clang++-3.8" CXXFLAGS="-fsanitize=address,undefined" CFLAGS="-fsanitize=address,undefined" LDFLAGS="-fsanitize=address,undefined" FEWER=true
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test' ]
|
sources: ['ubuntu-toolchain-r-test' ]
|
||||||
|
13
tests/onefeature/-zg_--drop-densest-as-needed.json
Normal file
13
tests/onefeature/-zg_--drop-densest-as-needed.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{ "type": "FeatureCollection", "properties": {
|
||||||
|
"bounds": "-180.000000,0.800000,180.000000,1.000000",
|
||||||
|
"center": "-179.989014,1.000000,14",
|
||||||
|
"description": "tests/onefeature/-zg_--drop-densest-as-needed.json.check.mbtiles",
|
||||||
|
"format": "pbf",
|
||||||
|
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 14, \"fields\": {} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 1,\"geometry\": \"LineString\",\"attributeCount\": 0,\"attributes\": []}]}}",
|
||||||
|
"maxzoom": "14",
|
||||||
|
"minzoom": "0",
|
||||||
|
"name": "tests/onefeature/-zg_--drop-densest-as-needed.json.check.mbtiles",
|
||||||
|
"type": "overlay",
|
||||||
|
"version": "2"
|
||||||
|
}, "features": [
|
||||||
|
] }
|
1
tests/onefeature/in.json
Normal file
1
tests/onefeature/in.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"":"","":[{"":"","":{"":[]},"":{"":""}},{"":"","type":"LineString","coordinates":[[1000,0.8],[900,1]]}
|
3
tile.cpp
3
tile.cpp
@ -2363,6 +2363,9 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo
|
|||||||
if (threads >= (1U << 30)) {
|
if (threads >= (1U << 30)) {
|
||||||
threads = 1U << 30;
|
threads = 1U << 30;
|
||||||
}
|
}
|
||||||
|
if (threads < 1) {
|
||||||
|
threads = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Assign temporary files to threads
|
// Assign temporary files to threads
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user