{"action":"created","issue":{"url":"https://api.github.com/repos/CTSRD-CHERI/lld/issues/14","repository_url":"https://api.github.com/repos/CTSRD-CHERI/lld","labels_url":"https://api.github.com/repos/CTSRD-CHERI/lld/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/CTSRD-CHERI/lld/issues/14/comments","events_url":"https://api.github.com/repos/CTSRD-CHERI/lld/issues/14/events","html_url":"https://github.com/CTSRD-CHERI/lld/issues/14","id":216167930,"number":14,"title":"Postgres/nginx crash when built with --fuse-ld=lld","user":{"login":"trasz","id":1238567,"avatar_url":"https://avatars3.githubusercontent.com/u/1238567?v=3","gravatar_id":"","url":"https://api.github.com/users/trasz","html_url":"https://github.com/trasz","followers_url":"https://api.github.com/users/trasz/followers","following_url":"https://api.github.com/users/trasz/following{/other_user}","gists_url":"https://api.github.com/users/trasz/gists{/gist_id}","starred_url":"https://api.github.com/users/trasz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trasz/subscriptions","organizations_url":"https://api.github.com/users/trasz/orgs","repos_url":"https://api.github.com/users/trasz/repos","events_url":"https://api.github.com/users/trasz/events{/privacy}","received_events_url":"https://api.github.com/users/trasz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"RichardsonAlex","id":4019307,"avatar_url":"https://avatars3.githubusercontent.com/u/4019307?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardsonAlex","html_url":"https://github.com/RichardsonAlex","followers_url":"https://api.github.com/users/RichardsonAlex/followers","following_url":"https://api.github.com/users/RichardsonAlex/following{/other_user}","gists_url":"https://api.github.com/users/RichardsonAlex/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardsonAlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardsonAlex/subscriptions","organizations_url":"https://api.github.com/users/RichardsonAlex/orgs","repos_url":"https://api.github.com/users/RichardsonAlex/repos","events_url":"https://api.github.com/users/RichardsonAlex/events{/privacy}","received_events_url":"https://api.github.com/users/RichardsonAlex/received_events","type":"User","site_admin":false},"assignees":[{"login":"RichardsonAlex","id":4019307,"avatar_url":"https://avatars3.githubusercontent.com/u/4019307?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardsonAlex","html_url":"https://github.com/RichardsonAlex","followers_url":"https://api.github.com/users/RichardsonAlex/followers","following_url":"https://api.github.com/users/RichardsonAlex/following{/other_user}","gists_url":"https://api.github.com/users/RichardsonAlex/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardsonAlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardsonAlex/subscriptions","organizations_url":"https://api.github.com/users/RichardsonAlex/orgs","repos_url":"https://api.github.com/users/RichardsonAlex/repos","events_url":"https://api.github.com/users/RichardsonAlex/events{/privacy}","received_events_url":"https://api.github.com/users/RichardsonAlex/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-03-22T18:36:02Z","updated_at":"2017-04-05T10:04:18Z","closed_at":null,"body":"Both postgres and nginx crash in a similar way when linked with lld.  In both cases it happens in jemalloc initialization, in a piece of code that looks like this:\r\n\r\n   1201c8040:   3c010000        lui     at,0x0\r\n   1201c8044:   7c03e83b        rdhwr   v1,$29\r\n   1201c8048:   64259000        daddiu  a1,at,-28672\r\n   1201c804c:   0065082d        daddu   at,v1,a1\r\n   1201c8050:   8c230000        lw      v1,0(at)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/CTSRD-CHERI/lld/issues/comments/291815034","html_url":"https://github.com/CTSRD-CHERI/lld/issues/14#issuecomment-291815034","issue_url":"https://api.github.com/repos/CTSRD-CHERI/lld/issues/14","id":291815034,"user":{"login":"trasz","id":1238567,"avatar_url":"https://avatars3.githubusercontent.com/u/1238567?v=3","gravatar_id":"","url":"https://api.github.com/users/trasz","html_url":"https://github.com/trasz","followers_url":"https://api.github.com/users/trasz/followers","following_url":"https://api.github.com/users/trasz/following{/other_user}","gists_url":"https://api.github.com/users/trasz/gists{/gist_id}","starred_url":"https://api.github.com/users/trasz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trasz/subscriptions","organizations_url":"https://api.github.com/users/trasz/orgs","repos_url":"https://api.github.com/users/trasz/repos","events_url":"https://api.github.com/users/trasz/events{/privacy}","received_events_url":"https://api.github.com/users/trasz/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T10:04:18Z","updated_at":"2017-04-05T10:04:18Z","body":"It looks like it's related to lld creating a dynamic executable when run with -E (--export-dynamic).  When run with -v, it looks like this:\r\n\r\n```\r\n--- objs/nginx ---\r\n/home/en322/cheri/output/sdk256/bin/clang -pipe --sysroot=/home/en322/cheri/output/sdk256/sysroot -B/home/en322/cheri/output/sdk256/bin -target cheri-unknown-freebsd -mabi=purecap -mxgot -O2 -msoft-float -ggdb -static -integrated-as -Wche\r\nri-capability-misuse -Werror=implicit-function-declaration -Werror=format -Werror=undefined-internal -fuse-ld=lld -o objs/nginx  objs/src/core/nginx.o  objs/src/core/ngx_log.o  objs/src/core/ngx_palloc.o  objs/src/core/ngx_array.o  objs/s\r\nrc/core/ngx_list.o  objs/src/core/ngx_hash.o  objs/src/core/ngx_buf.o  objs/src/core/ngx_queue.o  objs/src/core/ngx_output_chain.o  objs/src/core/ngx_string.o  objs/src/core/ngx_parse.o  objs/src/core/ngx_parse_time.o  objs/src/core/ngx_i\r\nnet.o  objs/src/core/ngx_file.o  objs/src/core/ngx_crc32.o  objs/src/core/ngx_murmurhash.o  objs/src/core/ngx_md5.o  objs/src/core/ngx_sha1.o  objs/src/core/ngx_rbtree.o  objs/src/core/ngx_radix_tree.o  objs/src/core/ngx_slab.o  objs/src/\r\ncore/ngx_times.o  objs/src/core/ngx_shmtx.o  objs/src/core/ngx_connection.o  objs/src/core/ngx_cycle.o  objs/src/core/ngx_spinlock.o  objs/src/core/ngx_rwlock.o  objs/src/core/ngx_cpuinfo.o  objs/src/core/ngx_conf_file.o  objs/src/core/ng\r\nx_module.o  objs/src/core/ngx_resolver.o  objs/src/core/ngx_open_file_cache.o  objs/src/core/ngx_crypt.o  objs/src/core/ngx_proxy_protocol.o  objs/src/core/ngx_syslog.o  objs/src/event/ngx_event.o  objs/src/event/ngx_event_timer.o  objs/s\r\nrc/event/ngx_event_posted.o  objs/src/event/ngx_event_accept.o  objs/src/event/ngx_event_connect.o  objs/src/event/ngx_event_pipe.o  objs/src/os/unix/ngx_time.o  objs/src/os/unix/ngx_errno.o  objs/src/os/unix/ngx_alloc.o  objs/src/os/unix\r\n/ngx_files.o  objs/src/os/unix/ngx_socket.o  objs/src/os/unix/ngx_recv.o  objs/src/os/unix/ngx_readv_chain.o  objs/src/os/unix/ngx_udp_recv.o  objs/src/os/unix/ngx_send.o  objs/src/os/unix/ngx_writev_chain.o  objs/src/os/unix/ngx_udp_send\r\n.o  objs/src/os/unix/ngx_udp_sendmsg_chain.o  objs/src/os/unix/ngx_channel.o  objs/src/os/unix/ngx_shmem.o  objs/src/os/unix/ngx_process.o  objs/src/os/unix/ngx_daemon.o  objs/src/os/unix/ngx_setaffinity.o  objs/src/os/unix/ngx_setproctit\r\nle.o  objs/src/os/unix/ngx_posix_init.o  objs/src/os/unix/ngx_user.o  objs/src/os/unix/ngx_dlopen.o  objs/src/os/unix/ngx_process_cycle.o  objs/src/os/unix/ngx_freebsd_init.o  objs/src/os/unix/ngx_freebsd_sendfile_chain.o  objs/src/event/\r\nmodules/ngx_kqueue_module.o  objs/src/http/ngx_http.o  objs/src/http/ngx_http_core_module.o  objs/src/http/ngx_http_special_response.o  objs/src/http/ngx_http_request.o  objs/src/http/ngx_http_parse.o  objs/src/http/modules/ngx_http_log_m\r\nodule.o  objs/src/http/ngx_http_request_body.o  objs/src/http/ngx_http_variables.o  objs/src/http/ngx_http_script.o  objs/src/http/ngx_http_upstream.o  objs/src/http/ngx_http_upstream_round_robin.o  objs/src/http/ngx_http_file_cache.o  ob\r\njs/src/http/ngx_http_write_filter_module.o  objs/src/http/ngx_http_header_filter_module.o  objs/src/http/modules/ngx_http_chunked_filter_module.o  objs/src/http/modules/ngx_http_range_filter_module.o  objs/src/http/modules/ngx_http_gzip_f\r\nilter_module.o  objs/src/http/ngx_http_postpone_filter_module.o  objs/src/http/modules/ngx_http_ssi_filter_module.o  objs/src/http/modules/ngx_http_charset_filter_module.o  objs/src/http/modules/ngx_http_userid_filter_module.o  objs/src/h\r\nttp/modules/ngx_http_headers_filter_module.o  objs/src/http/ngx_http_copy_filter_module.o  objs/src/http/modules/ngx_http_not_modified_filter_module.o  objs/src/http/modules/ngx_http_static_module.o  objs/src/http/modules/ngx_http_autoind\r\nex_module.o  objs/src/http/modules/ngx_http_index_module.o  objs/src/http/modules/ngx_http_auth_basic_module.o  objs/src/http/modules/ngx_http_access_module.o  objs/src/http/modules/ngx_http_limit_conn_module.o  objs/src/http/modules/ngx_\r\nhttp_limit_req_module.o  objs/src/http/modules/ngx_http_geo_module.o  objs/src/http/modules/ngx_http_map_module.o  objs/src/http/modules/ngx_http_split_clients_module.o  objs/src/http/modules/ngx_http_referer_module.o  objs/src/http/modul\r\nes/ngx_http_proxy_module.o  objs/src/http/modules/ngx_http_fastcgi_module.o  objs/src/http/modules/ngx_http_uwsgi_module.o  objs/src/http/modules/ngx_http_scgi_module.o  objs/src/http/modules/ngx_http_memcached_module.o  objs/src/http/mod\r\nules/ngx_http_empty_gif_module.o  objs/src/http/modules/ngx_http_browser_module.o  objs/src/http/modules/ngx_http_upstream_hash_module.o  objs/src/http/modules/ngx_http_upstream_ip_hash_module.o  objs/src/http/modules/ngx_http_upstream_le\r\nast_conn_module.o  objs/src/http/modules/ngx_http_upstream_keepalive_module.o  objs/src/http/modules/ngx_http_upstream_zone_module.o  objs/ngx_modules.o  -lcrypt -lz  -Wl,-E -v\r\nclang version 5.0.0 (https://github.com/CTSRD-CHERI/clang.git 520ebe16e7f8f96ccf30266dbab8d7d27c27f64d) (https://github.com/CTSRD-CHERI/llvm.git db1cf1fff6307cb2da2aa990cb1bc85bf0a171f3)\r\nTarget: cheri-unknown-freebsd\r\nThread model: posix\r\nInstalledDir: /home/en322/cheri/output/sdk256/bin\r\n \"/home/en322/cheri/output/sdk256/bin/cheri-unknown-freebsd-ld.lld\" --sysroot=/home/en322/cheri/output/sdk256/sysroot --eh-frame-hdr -Bstatic --no-warn-mismatch -o objs/nginx /home/en322/cheri/output/sdk256/sysroot/usr/libcheri/crt1.o /ho\r\nme/en322/cheri/output/sdk256/sysroot/usr/libcheri/crtbeginT.o -L/home/en322/cheri/output/sdk256/sysroot/usr/libcheri objs/src/core/nginx.o objs/src/core/ngx_log.o objs/src/core/ngx_palloc.o objs/src/core/ngx_array.o objs/src/core/ngx_list\r\n.o objs/src/core/ngx_hash.o objs/src/core/ngx_buf.o objs/src/core/ngx_queue.o objs/src/core/ngx_output_chain.o objs/src/core/ngx_string.o objs/src/core/ngx_parse.o objs/src/core/ngx_parse_time.o objs/src/core/ngx_inet.o objs/src/core/ngx_\r\nfile.o objs/src/core/ngx_crc32.o objs/src/core/ngx_murmurhash.o objs/src/core/ngx_md5.o objs/src/core/ngx_sha1.o objs/src/core/ngx_rbtree.o objs/src/core/ngx_radix_tree.o objs/src/core/ngx_slab.o objs/src/core/ngx_times.o objs/src/core/ng\r\nx_shmtx.o objs/src/core/ngx_connection.o objs/src/core/ngx_cycle.o objs/src/core/ngx_spinlock.o objs/src/core/ngx_rwlock.o objs/src/core/ngx_cpuinfo.o objs/src/core/ngx_conf_file.o objs/src/core/ngx_module.o objs/src/core/ngx_resolver.o o\r\nbjs/src/core/ngx_open_file_cache.o objs/src/core/ngx_crypt.o objs/src/core/ngx_proxy_protocol.o objs/src/core/ngx_syslog.o objs/src/event/ngx_event.o objs/src/event/ngx_event_timer.o objs/src/event/ngx_event_posted.o objs/src/event/ngx_ev\r\nent_accept.o objs/src/event/ngx_event_connect.o objs/src/event/ngx_event_pipe.o objs/src/os/unix/ngx_time.o objs/src/os/unix/ngx_errno.o objs/src/os/unix/ngx_alloc.o objs/src/os/unix/ngx_files.o objs/src/os/unix/ngx_socket.o objs/src/os/u\r\nnix/ngx_recv.o objs/src/os/unix/ngx_readv_chain.o objs/src/os/unix/ngx_udp_recv.o objs/src/os/unix/ngx_send.o objs/src/os/unix/ngx_writev_chain.o objs/src/os/unix/ngx_udp_send.o objs/src/os/unix/ngx_udp_sendmsg_chain.o objs/src/os/unix/ng\r\nx_channel.o objs/src/os/unix/ngx_shmem.o objs/src/os/unix/ngx_process.o objs/src/os/unix/ngx_daemon.o objs/src/os/unix/ngx_setaffinity.o objs/src/os/unix/ngx_setproctitle.o objs/src/os/unix/ngx_posix_init.o objs/src/os/unix/ngx_user.o obj\r\ns/src/os/unix/ngx_dlopen.o objs/src/os/unix/ngx_process_cycle.o objs/src/os/unix/ngx_freebsd_init.o objs/src/os/unix/ngx_freebsd_sendfile_chain.o objs/src/event/modules/ngx_kqueue_module.o objs/src/http/ngx_http.o objs/src/http/ngx_http_c\r\nore_module.o objs/src/http/ngx_http_special_response.o objs/src/http/ngx_http_request.o objs/src/http/ngx_http_parse.o objs/src/http/modules/ngx_http_log_module.o objs/src/http/ngx_http_request_body.o objs/src/http/ngx_http_variables.o ob\r\njs/src/http/ngx_http_script.o objs/src/http/ngx_http_upstream.o objs/src/http/ngx_http_upstream_round_robin.o objs/src/http/ngx_http_file_cache.o objs/src/http/ngx_http_write_filter_module.o objs/src/http/ngx_http_header_filter_module.o o\r\nbjs/src/http/modules/ngx_http_chunked_filter_module.o objs/src/http/modules/ngx_http_range_filter_module.o objs/src/http/modules/ngx_http_gzip_filter_module.o objs/src/http/ngx_http_postpone_filter_module.o objs/src/http/modules/ngx_http_\r\nssi_filter_module.o objs/src/http/modules/ngx_http_charset_filter_module.o objs/src/http/modules/ngx_http_userid_filter_module.o objs/src/http/modules/ngx_http_headers_filter_module.o objs/src/http/ngx_http_copy_filter_module.o objs/src/h\r\nttp/modules/ngx_http_not_modified_filter_module.o objs/src/http/modules/ngx_http_static_module.o objs/src/http/modules/ngx_http_autoindex_module.o objs/src/http/modules/ngx_http_index_module.o objs/src/http/modules/ngx_http_auth_basic_mod\r\nule.o objs/src/http/modules/ngx_http_access_module.o objs/src/http/modules/ngx_http_limit_conn_module.o objs/src/http/modules/ngx_http_limit_req_module.o objs/src/http/modules/ngx_http_geo_module.o objs/src/http/modules/ngx_http_map_modul\r\ne.o objs/src/http/modules/ngx_http_split_clients_module.o objs/src/http/modules/ngx_http_referer_module.o objs/src/http/modules/ngx_http_proxy_module.o objs/src/http/modules/ngx_http_fastcgi_module.o objs/src/http/modules/ngx_http_uwsgi_m\r\nodule.o objs/src/http/modules/ngx_http_scgi_module.o objs/src/http/modules/ngx_http_memcached_module.o objs/src/http/modules/ngx_http_empty_gif_module.o objs/src/http/modules/ngx_http_browser_module.o objs/src/http/modules/ngx_http_upstre\r\nam_hash_module.o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o objs/src/http/modules/ngx_http_upstream_least_conn_module.o objs/src/http/modules/ngx_http_upstream_keepalive_module.o objs/src/http/modules/ngx_http_upstream_zone_\r\nmodule.o objs/ngx_modules.o -lcrypt -lz -E -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /home/en322/cheri/output/sdk256/sysroot/usr/libcheri/crtend.o\r\n```"}}
{"actor":{"display_login":"trasz"}}