{"id":644,"date":"2016-10-02T17:57:12","date_gmt":"2016-10-02T15:57:12","guid":{"rendered":"http:\/\/blogs.gentoo.org\/ago\/?p=644"},"modified":"2016-10-02T17:57:12","modified_gmt":"2016-10-02T15:57:12","slug":"libdwarf-tag_tree_build-and-tag_attr_build-signed-shift","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/ago\/2016\/10\/02\/libdwarf-tag_tree_build-and-tag_attr_build-signed-shift\/","title":{"rendered":"libdwarf:  tag_tree_build and tag_attr_build: signed shift"},"content":{"rendered":"<p><strong>Description<\/strong>:<br \/>\n<a href=\"https:\/\/www.prevanders.net\/dwarf.html\">libdwarf<\/a> is a library to consume and produce DWARF debug information.<\/p>\n<p>The following issue came out during the build with the undefined behavior sanitizer.<\/p>\n<p>The complete UBsan output:<\/p>\n<pre><font size=\"2\">LD_LIBRARY_PATH=$LD_LIBRARY_PATH:..\/libdwarf .\/tag_tree_build -s  -i tmp-tag-\r\ntree-build1.tmp  -o tmp-tt-table.c \r\ntag_tree.c:350:60: runtime error: left shift of 1 by 31 places cannot be \r\nrepresented in type 'int'\r\n\r\nLD_LIBRARY_PATH=$LD_LIBRARY_PATH:..\/libdwarf .\/tag_attr_build -s -i tmp-tag-\r\nattr-build2.tmp -o tmp-ta-table.c \r\ntag_attr.c:386:60: runtime error: left shift of 1 by 31 places cannot be \r\nrepresented in type 'int'\r\n<\/font><\/pre>\n<p><strong>Affected version:<\/strong><br \/>\n20160929 and past<\/p>\n<p><strong>Fixed version:<\/strong><br \/>\n20161001<\/p>\n<p><strong>Commit fix:<\/strong><br \/>\n<a href=\"https:\/\/sourceforge.net\/p\/libdwarf\/code\/ci\/cdd1b6d98c2c13c92bbe3556130ab00daf663a6c\/\">https:\/\/sourceforge.net\/p\/libdwarf\/code\/ci\/cdd1b6d98c2c13c92bbe3556130ab00daf663a6c\/<\/a><\/p>\n<p><strong>Credit:<\/strong><br \/>\nThis bug was discovered by Agostino Sarubbo of Gentoo.<\/p>\n<p><strong>Timeline:<\/strong><br \/>\n2016-09-30: bug discovered<br \/>\n2016-09-30: bug reported privately to upstream<br \/>\n2016-09-30: upstream realeased a patch<br \/>\n2016-10-01: upstream released version 20161001<br \/>\n2016-10-02: blog post about the issue<\/p>\n<p><strong>Note:<\/strong><br \/>\nThis bug was found with <a href=\"http:\/\/clang.llvm.org\/docs\/UndefinedBehaviorSanitizer.html\">the undefined behavior sanitizer<\/a>.<\/p>\n<p><strong>Permalink:<\/strong><\/p>\n<blockquote data-secret=\"NZVYU3THbZ\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/blogs.gentoo.org\/ago\/2016\/10\/02\/libdwarf-tag_tree_build-and-tag_attr_build-signed-shift\/\">libdwarf:  tag_tree_build and tag_attr_build: signed shift<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"http:\/\/blogs.gentoo.org\/ago\/2016\/10\/02\/libdwarf-tag_tree_build-and-tag_attr_build-signed-shift\/embed\/#?secret=NZVYU3THbZ\" data-secret=\"NZVYU3THbZ\" width=\"600\" height=\"338\" title=\"&#8220;libdwarf:  tag_tree_build and tag_attr_build: signed shift&#8221; &#8212; agostino&#039;s blog\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: libdwarf is a library to consume and produce DWARF debug information. The following issue came out during the build with the undefined behavior sanitizer. The complete UBsan output: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:..\/libdwarf .\/tag_tree_build -s -i tmp-tag- tree-build1.tmp -o tmp-tt-table.c tag_tree.c:350:60: runtime error: &hellip; <a href=\"https:\/\/blogs.gentoo.org\/ago\/2016\/10\/02\/libdwarf-tag_tree_build-and-tag_attr_build-signed-shift\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":140,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[12,10],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2EaBc-ao","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/644"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/users\/140"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/comments?post=644"}],"version-history":[{"count":3,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/644\/revisions"}],"predecessor-version":[{"id":647,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/posts\/644\/revisions\/647"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/media?parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/categories?post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/ago\/wp-json\/wp\/v2\/tags?post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}