<p>The IDs are too large for the dense node cache. There is an unchecked array access around <a href="https://github.com/openstreetmap/osm2pgsql/blob/master/node-ram-cache.c#L167">here</a>. <a href="https://github.com/apmon" class="user-mention">@apmon</a> you probably know better what the best fallback is when blocks is too small. <code>ram_cache_nodes_get_dense()</code> has the same problem.</p>

<p>You can force osm2pgsql to switch to sparse caching with the option <code>--cache-strategy sparse</code> as a workaround.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/openstreetmap/osm2pgsql/issues/23#issuecomment-17302557'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/g8smGCFOcVLF28Q-xX3zcbZOnvEVErrIUIS9wQQhfruEaCskRN1O6s3fgNd_i91K.gif' height='1' width='1'></p>