[Tile-serving] [osm2pgsql] Segmentation fault (#290)
Jon Burgess
notifications at github.com
Fri Feb 13 23:30:52 UTC 2015
The problem is that the maximum supported way ID is 2^31. The crash can be fixed by raising the upper limit using the patch below. I have verified that this prevents the crash but have not done any further testing.
```
diff --git a/middle-ram.cpp b/middle-ram.cpp
index 01deb43..3bb52ea 100644
--- a/middle-ram.cpp
+++ b/middle-ram.cpp
@@ -43,7 +43,7 @@
#define BLOCK_SHIFT 10
#define PER_BLOCK (1 << BLOCK_SHIFT)
-#define NUM_BLOCKS (1 << (32 - BLOCK_SHIFT))
+#define NUM_BLOCKS (1 << (33 - BLOCK_SHIFT))
static osmid_t id2block(osmid_t id)
{
```
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/290#issuecomment-74345815
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150213/a6911cc8/attachment.html>
More information about the Tile-serving
mailing list