<p>While debugging some other issue, I noticed that particularly large object ids trigger a segfault in <code>node_ram_cache::set_dense(long, osmium::Location const&)</code> at node-ram-cache.cpp:141 (tested on <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/osm2pgsql/commit/8d9087f1111f4a062158e8e6b10bfbceed90899b/hovercard" href="https://github.com/openstreetmap/osm2pgsql/commit/8d9087f1111f4a062158e8e6b10bfbceed90899b"><tt>8d9087f</tt></a> ). I'd rather expect an error message here stating that the object id is too large.</p>
<p>This is not really urgent in any way, as it might only affect people mixing OSM with some other data. I thought I'd raise it anyway, as segfaults are generally not so nice.</p>
<p>Test example: (<code>osm2pgsql -d osm tesfile.osm</code>).</p>
<pre><code><?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
<node id='540000000001' timestamp='2015-01-01T00:00:00Z' uid='1' user='3' version='1' changeset='10' lat='50' lon='7'/>
</osm>
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/965?email_source=notifications&email_token=AA6353XF5IQQKEA2JJ3LNM3QRB33XA5CNFSM4JGNHOA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HVE3HYA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353W3WHEYZ5KHJ7CNFILQRB33XANCNFSM4JGNHOAQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353WBWXQBYLUZVT3FDZ3QRB33XA5CNFSM4JGNHOA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HVE3HYA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/965?email_source=notifications\u0026email_token=AA6353XF5IQQKEA2JJ3LNM3QRB33XA5CNFSM4JGNHOA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HVE3HYA",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/965?email_source=notifications\u0026email_token=AA6353XF5IQQKEA2JJ3LNM3QRB33XA5CNFSM4JGNHOA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HVE3HYA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>