Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add try-include and uses #4

Closed
wants to merge 6 commits into from
Closed

Conversation

devinteske
Copy link
Contributor

Add a new try-include function and use it to conditionally load /boot/loader.rc.local and /boot/menu.rc.local

Add try-include
Add try-include
Add try-include (first usage, /boot/loader.rc.local)
Add try-include (first usage /boot/loader.rc.local)
Add try-include (second usage /boot/menu.rc.local)
Refactor draw-beastie
emaste referenced this pull request in emaste/freebsd Dec 13, 2013
these are FCOE stats (fiber channel over ethernet), something that
FreeBSD does not yet have, they were mistaken for flow control by
the implementor I believe. Secondly, the real flow control stats
are oddly named with a 'link' tag on the front, it was requested
by my validation engineer to make these stats have the same name as
the igb driver for clarity and that seemed reasonable to me.
@ignisf
Copy link

ignisf commented Jan 17, 2014

Hello,

This is just an SVN -> git mirror of FreeBSD. The official way of proposing changes is through opening an issue in the FreeBSD GNATS http://www.freebsd.org/support/bugreports.html.

DaElf pushed a commit to DaElf/freebsd that referenced this pull request May 13, 2014
…tics,

these are FCOE stats (fiber channel over ethernet), something that
FreeBSD does not yet have, they were mistaken for flow control by
the implementor I believe. Secondly, the real flow control stats
are oddly named with a 'link' tag on the front, it was requested
by my validation engineer to make these stats have the same name as
the igb driver for clarity and that seemed reasonable to me.


git-svn-id: svn://svn.freebsd.org/base/head@243721 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Oct 26, 2015
The new load_ma implementation can cause dereferences when used with
certain drivers, back it out until the reason is found:

Fatal trap 12: page fault while in kernel mode
cpuid = 11; apic id = 03
fault virtual address   = 0x30
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff808a2d22
stack pointer           = 0x28:0xfffffe07cc737710
frame pointer           = 0x28:0xfffffe07cc737790
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 13 (g_down)
trap number             = 12
panic: page fault
cpuid = 11
KDB: stack backtrace:
#0 0xffffffff80641647 at kdb_backtrace+0x67
#1 0xffffffff80606762 at vpanic+0x182
#2 0xffffffff806067e3 at panic+0x43
#3 0xffffffff8084eef1 at trap_fatal+0x351
#4 0xffffffff8084f0e4 at trap_pfault+0x1e4
#5 0xffffffff8084e82f at trap+0x4bf
#6 0xffffffff80830d57 at calltrap+0x8
#7 0xffffffff8063beab at _bus_dmamap_load_ccb+0x1fb
#8 0xffffffff8063bc51 at bus_dmamap_load_ccb+0x91
#9 0xffffffff8042dcad at ata_dmaload+0x11d
#10 0xffffffff8042df7e at ata_begin_transaction+0x7e
#11 0xffffffff8042c18e at ataaction+0x9ce
#12 0xffffffff802a220f at xpt_run_devq+0x5bf
#13 0xffffffff802a17ad at xpt_action_default+0x94d
#14 0xffffffff802c0024 at adastart+0x8b4
#15 0xffffffff802a2e93 at xpt_run_allocq+0x193
#16 0xffffffff802c0735 at adastrategy+0xf5
#17 0xffffffff80554206 at g_disk_start+0x426
Uptime: 2m29s


git-svn-id: svn+ssh://svn.freebsd.org/base/head@290005 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Oct 26, 2015
The new load_ma implementation can cause dereferences when used with
certain drivers, back it out until the reason is found:

Fatal trap 12: page fault while in kernel mode
cpuid = 11; apic id = 03
fault virtual address   = 0x30
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff808a2d22
stack pointer           = 0x28:0xfffffe07cc737710
frame pointer           = 0x28:0xfffffe07cc737790
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 13 (g_down)
trap number             = 12
panic: page fault
cpuid = 11
KDB: stack backtrace:
#0 0xffffffff80641647 at kdb_backtrace+0x67
#1 0xffffffff80606762 at vpanic+0x182
#2 0xffffffff806067e3 at panic+0x43
#3 0xffffffff8084eef1 at trap_fatal+0x351
#4 0xffffffff8084f0e4 at trap_pfault+0x1e4
#5 0xffffffff8084e82f at trap+0x4bf
#6 0xffffffff80830d57 at calltrap+0x8
#7 0xffffffff8063beab at _bus_dmamap_load_ccb+0x1fb
#8 0xffffffff8063bc51 at bus_dmamap_load_ccb+0x91
#9 0xffffffff8042dcad at ata_dmaload+0x11d
#10 0xffffffff8042df7e at ata_begin_transaction+0x7e
#11 0xffffffff8042c18e at ataaction+0x9ce
#12 0xffffffff802a220f at xpt_run_devq+0x5bf
#13 0xffffffff802a17ad at xpt_action_default+0x94d
#14 0xffffffff802c0024 at adastart+0x8b4
#15 0xffffffff802a2e93 at xpt_run_allocq+0x193
#16 0xffffffff802c0735 at adastrategy+0xf5
#17 0xffffffff80554206 at g_disk_start+0x426
Uptime: 2m29s
dumbbell added a commit to dumbbell/freebsd-src that referenced this pull request Mar 8, 2016
Two users reported on freebsd-x11@ that this commit broke their display
on Haswell. They only got a blank screen.

This reverts commit 72bb3b3.

Fixes freebsd#4.
uqs pushed a commit that referenced this pull request Apr 7, 2016
UART drivers.

- uart_dev_mtk.[ch] are the old-style Mediatek/Ralink-specific UART driver
  as also found in sys/mips/rt305x/uart_dev_rt305x.c, with minor improvements
  and FDT attachment enabled for the appropriate SoCs.
- uart_dev_mtk_ns8250.c is the new-style ns16550a-compatible UART driver
  found in newer Mediatek SoCs. It uses the uart_dev_ns8250.c driver
  indirectly and is basically just a wrapper around it and only overrides its
  probe method.
  The reason I am not using the uart_dev_ns8250.c driver directly is because
  I have some code that does UART clock detection before initializing the
  UART, so that we don't need to hard-code the UART clock frequency in the
  dts files for each board.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5840


git-svn-id: svn+ssh://svn.freebsd.org/base/head@297669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Apr 7, 2016
UART drivers.

- uart_dev_mtk.[ch] are the old-style Mediatek/Ralink-specific UART driver
  as also found in sys/mips/rt305x/uart_dev_rt305x.c, with minor improvements
  and FDT attachment enabled for the appropriate SoCs.
- uart_dev_mtk_ns8250.c is the new-style ns16550a-compatible UART driver
  found in newer Mediatek SoCs. It uses the uart_dev_ns8250.c driver
  indirectly and is basically just a wrapper around it and only overrides its
  probe method.
  The reason I am not using the uart_dev_ns8250.c driver directly is because
  I have some code that does UART clock detection before initializing the
  UART, so that we don't need to hard-code the UART clock frequency in the
  dts files for each board.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5840
bdrewery pushed a commit to bdrewery/freebsd that referenced this pull request Apr 11, 2016
UART drivers.

- uart_dev_mtk.[ch] are the old-style Mediatek/Ralink-specific UART driver
  as also found in sys/mips/rt305x/uart_dev_rt305x.c, with minor improvements
  and FDT attachment enabled for the appropriate SoCs.
- uart_dev_mtk_ns8250.c is the new-style ns16550a-compatible UART driver
  found in newer Mediatek SoCs. It uses the uart_dev_ns8250.c driver
  indirectly and is basically just a wrapper around it and only overrides its
  probe method.
  The reason I am not using the uart_dev_ns8250.c driver directly is because
  I have some code that does UART clock detection before initializing the
  UART, so that we don't need to hard-code the UART clock frequency in the
  dts files for each board.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5840


git-svn-id: svn+ssh://svn.freebsd.org/base/head@297669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Jun 19, 2016
Drop scan generation number and node table scan lock - the only place
where ni_scangen is checked is in ieee80211_timeout_stations() (and it
is used to prevent duplicate checking of the same node); node scan lock
protects only this variable + node table scan generation number.

This will fix (at least) next LOR (hostap mode):

lock order reversal:
1st 0xc175f84c urtwm0_scan_loc (urtwm0_scan_loc) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2019
2nd 0xc175e018 urtwm0_com_lock (urtwm0_com_lock) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2693
stack backtrace:
#0 0xa070d1c5 at witness_debugger+0x75
#1 0xa070d0f6 at witness_checkorder+0xd46
#2 0xa0694cce at __mtx_lock_flags+0x9e
#3 0xb03ad9ef at ieee80211_node_leave+0x12f
#4 0xb03afd13 at ieee80211_timeout_stations+0x483
#5 0xb03aa1c2 at ieee80211_node_timeout+0x42
#6 0xa06c6fa1 at softclock_call_cc+0x1e1
#7 0xa06c7518 at softclock+0xc8
#8 0xa06789ae at intr_event_execute_handlers+0x8e
#9 0xa0678fa0 at ithread_loop+0x90
#10 0xa0675fbe at fork_exit+0x7e
#11 0xa08af910 at fork_trampoline+0x8

In addition to the above:

* switch to ieee80211_iterate_nodes();
* do not assert that node table lock is held, while calling node_age();
  that's not really needed (there are no resources, which can be protected
  by this lock) + this fixes LOR/deadlock between ieee80211_timeout_stations()
  and ieee80211_set_tim() (easy to reproduce in HOSTAP mode while
  sending something to an STA with enabled power management).

Tested:

* (avos) urtwn0, hostap mode
* (adrian) AR9380, STA mode
* (adrian) AR9380, AR9331, AR9580, hostap mode

Notes:

* This changes the net80211 internals, so you have to recompile all of it
  and the wifi drivers.

Submitted by:	avos
Approved by:	re (delphij)
Differential Revision:	https://reviews.freebsd.org/D6833


git-svn-id: svn+ssh://svn.freebsd.org/base/head@302018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Jun 19, 2016
Drop scan generation number and node table scan lock - the only place
where ni_scangen is checked is in ieee80211_timeout_stations() (and it
is used to prevent duplicate checking of the same node); node scan lock
protects only this variable + node table scan generation number.

This will fix (at least) next LOR (hostap mode):

lock order reversal:
1st 0xc175f84c urtwm0_scan_loc (urtwm0_scan_loc) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2019
2nd 0xc175e018 urtwm0_com_lock (urtwm0_com_lock) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2693
stack backtrace:
#0 0xa070d1c5 at witness_debugger+0x75
#1 0xa070d0f6 at witness_checkorder+0xd46
#2 0xa0694cce at __mtx_lock_flags+0x9e
#3 0xb03ad9ef at ieee80211_node_leave+0x12f
#4 0xb03afd13 at ieee80211_timeout_stations+0x483
#5 0xb03aa1c2 at ieee80211_node_timeout+0x42
#6 0xa06c6fa1 at softclock_call_cc+0x1e1
#7 0xa06c7518 at softclock+0xc8
#8 0xa06789ae at intr_event_execute_handlers+0x8e
#9 0xa0678fa0 at ithread_loop+0x90
#10 0xa0675fbe at fork_exit+0x7e
#11 0xa08af910 at fork_trampoline+0x8

In addition to the above:

* switch to ieee80211_iterate_nodes();
* do not assert that node table lock is held, while calling node_age();
  that's not really needed (there are no resources, which can be protected
  by this lock) + this fixes LOR/deadlock between ieee80211_timeout_stations()
  and ieee80211_set_tim() (easy to reproduce in HOSTAP mode while
  sending something to an STA with enabled power management).

Tested:

* (avos) urtwn0, hostap mode
* (adrian) AR9380, STA mode
* (adrian) AR9380, AR9331, AR9580, hostap mode

Notes:

* This changes the net80211 internals, so you have to recompile all of it
  and the wifi drivers.

Submitted by:	avos
Approved by:	re (delphij)
Differential Revision:	https://reviews.freebsd.org/D6833
bdrewery pushed a commit to bdrewery/freebsd that referenced this pull request Jun 21, 2016
Drop scan generation number and node table scan lock - the only place
where ni_scangen is checked is in ieee80211_timeout_stations() (and it
is used to prevent duplicate checking of the same node); node scan lock
protects only this variable + node table scan generation number.

This will fix (at least) next LOR (hostap mode):

lock order reversal:
1st 0xc175f84c urtwm0_scan_loc (urtwm0_scan_loc) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2019
2nd 0xc175e018 urtwm0_com_lock (urtwm0_com_lock) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2693
stack backtrace:
#0 0xa070d1c5 at witness_debugger+0x75
freebsd#1 0xa070d0f6 at witness_checkorder+0xd46
freebsd#2 0xa0694cce at __mtx_lock_flags+0x9e
freebsd#3 0xb03ad9ef at ieee80211_node_leave+0x12f
freebsd#4 0xb03afd13 at ieee80211_timeout_stations+0x483
freebsd#5 0xb03aa1c2 at ieee80211_node_timeout+0x42
freebsd#6 0xa06c6fa1 at softclock_call_cc+0x1e1
freebsd#7 0xa06c7518 at softclock+0xc8
freebsd#8 0xa06789ae at intr_event_execute_handlers+0x8e
freebsd#9 0xa0678fa0 at ithread_loop+0x90
freebsd#10 0xa0675fbe at fork_exit+0x7e
freebsd#11 0xa08af910 at fork_trampoline+0x8

In addition to the above:

* switch to ieee80211_iterate_nodes();
* do not assert that node table lock is held, while calling node_age();
  that's not really needed (there are no resources, which can be protected
  by this lock) + this fixes LOR/deadlock between ieee80211_timeout_stations()
  and ieee80211_set_tim() (easy to reproduce in HOSTAP mode while
  sending something to an STA with enabled power management).

Tested:

* (avos) urtwn0, hostap mode
* (adrian) AR9380, STA mode
* (adrian) AR9380, AR9331, AR9580, hostap mode

Notes:

* This changes the net80211 internals, so you have to recompile all of it
  and the wifi drivers.

Submitted by:	avos
Approved by:	re (delphij)
Differential Revision:	https://reviews.freebsd.org/D6833


git-svn-id: svn+ssh://svn.freebsd.org/base/head@302018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Aug 20, 2016
  Fix for pr24346: arm asm label calculation error in sub

  Some ARM instructions encode 32-bit immediates as a 8-bit integer
  (0-255) and a 4-bit rotation (0-30, even) in its least significant 12
  bits. The original fixup, FK_Data_4, patches the instruction by the
  value bit-to-bit, regardless of the encoding. For example, assuming
  the label L1 and L2 are 0x0 and 0x104 respectively, the following
  instruction:

    add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

  would be assembled to the following, which adds 1 to r0, instead of
  260:

    e2800104 add r0, r0, #4, 2 ; equivalently 1

  The new fixup kind fixup_arm_mod_imm takes care of the encoding:

    e2800f41 add r0, r0, #260

  Patch by Ting-Yuan Huang!

This fixes label calculation for ARM assembly, and is needed to enable
ARM assembly sources for OpenSSL.

Requested by:	jkim
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@304530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Aug 20, 2016
  Fix for pr24346: arm asm label calculation error in sub

  Some ARM instructions encode 32-bit immediates as a 8-bit integer
  (0-255) and a 4-bit rotation (0-30, even) in its least significant 12
  bits. The original fixup, FK_Data_4, patches the instruction by the
  value bit-to-bit, regardless of the encoding. For example, assuming
  the label L1 and L2 are 0x0 and 0x104 respectively, the following
  instruction:

    add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

  would be assembled to the following, which adds 1 to r0, instead of
  260:

    e2800104 add r0, r0, #4, 2 ; equivalently 1

  The new fixup kind fixup_arm_mod_imm takes care of the encoding:

    e2800f41 add r0, r0, #260

  Patch by Ting-Yuan Huang!

This fixes label calculation for ARM assembly, and is needed to enable
ARM assembly sources for OpenSSL.

Requested by:	jkim
MFC after:	3 days
uqs pushed a commit that referenced this pull request Aug 23, 2016
Pull in r265122 from upstream llvm trunk (by James Molloy):

  Fix for pr24346: arm asm label calculation error in sub

  Some ARM instructions encode 32-bit immediates as a 8-bit integer
  (0-255) and a 4-bit rotation (0-30, even) in its least significant 12
  bits. The original fixup, FK_Data_4, patches the instruction by the
  value bit-to-bit, regardless of the encoding. For example, assuming
  the label L1 and L2 are 0x0 and 0x104 respectively, the following
  instruction:

    add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

  would be assembled to the following, which adds 1 to r0, instead of
  260:

    e2800104 add r0, r0, #4, 2 ; equivalently 1

  The new fixup kind fixup_arm_mod_imm takes care of the encoding:

    e2800f41 add r0, r0, #260

  Patch by Ting-Yuan Huang!

This fixes label calculation for ARM assembly, and is needed to enable
ARM assembly sources for OpenSSL.

Requested by:	jkim
uqs pushed a commit that referenced this pull request Aug 23, 2016
Pull in r265122 from upstream llvm trunk (by James Molloy):

  Fix for pr24346: arm asm label calculation error in sub

  Some ARM instructions encode 32-bit immediates as a 8-bit integer
  (0-255) and a 4-bit rotation (0-30, even) in its least significant 12
  bits. The original fixup, FK_Data_4, patches the instruction by the
  value bit-to-bit, regardless of the encoding. For example, assuming
  the label L1 and L2 are 0x0 and 0x104 respectively, the following
  instruction:

    add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

  would be assembled to the following, which adds 1 to r0, instead of
  260:

    e2800104 add r0, r0, #4, 2 ; equivalently 1

  The new fixup kind fixup_arm_mod_imm takes care of the encoding:

    e2800f41 add r0, r0, #260

  Patch by Ting-Yuan Huang!

This fixes label calculation for ARM assembly, and is needed to enable
ARM assembly sources for OpenSSL.

Approved by:	re (kib)
Requested by:	jkim
bdrewery pushed a commit to bdrewery/freebsd that referenced this pull request Aug 24, 2016
  Fix for pr24346: arm asm label calculation error in sub

  Some ARM instructions encode 32-bit immediates as a 8-bit integer
  (0-255) and a 4-bit rotation (0-30, even) in its least significant 12
  bits. The original fixup, FK_Data_4, patches the instruction by the
  value bit-to-bit, regardless of the encoding. For example, assuming
  the label L1 and L2 are 0x0 and 0x104 respectively, the following
  instruction:

    add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

  would be assembled to the following, which adds 1 to r0, instead of
  260:

    e2800104 add r0, r0, freebsd#4, 2 ; equivalently 1

  The new fixup kind fixup_arm_mod_imm takes care of the encoding:

    e2800f41 add r0, r0, freebsd#260

  Patch by Ting-Yuan Huang!

This fixes label calculation for ARM assembly, and is needed to enable
ARM assembly sources for OpenSSL.

Requested by:	jkim
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@304530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Sep 14, 2016
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r304989.

MFC after:	1 week
Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f


git-svn-id: svn+ssh://svn.freebsd.org/base/head@305819 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Sep 14, 2016
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r304989.

MFC after:	1 week
Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f
uqs pushed a commit that referenced this pull request Sep 25, 2016
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r305188.

Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f
uqs pushed a commit that referenced this pull request Sep 25, 2016
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r305192.

Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f
bdrewery pushed a commit to bdrewery/freebsd that referenced this pull request Sep 26, 2016
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR freebsd#778: ACL error handling
Issue freebsd#745: Symlink check prefix optimization is too aggressive
Issue freebsd#746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability freebsd#3 and vulnerability freebsd#4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability freebsd#2 has already been merged in r304989.

MFC after:	1 week
Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f


git-svn-id: svn+ssh://svn.freebsd.org/base/head@305819 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uqs pushed a commit that referenced this pull request Sep 27, 2016
=== bspatch ===

MFS r306213: bspatch Capsicumization, sanity checks, and other improvements

r304691: bspatch: apply style(9)

Make style changes (and trivial refactoring of open calls) now in order
to reduce noise in diffs for future capsicum changes.

r304807 (allanjude): Capsicumize bspatch

Move all of the fopen() and open() calls to the top of main()

Restrict each FD to least privilege (read/seek only, write only, etc)

cap_enter(), and make all except the output FD read/seek only.

r304821: bspatch: remove output file in the case of error

r305486: bspatch: add sanity checks on sizes to avoid integer overflow

Note that this introduces an explicit 2GB limit, but this was already
implicit in variable and function argument types.

This is based on the "non-cryptanalytic attacks against freebsd
update components" anonymous gist. Further refinement is planned.

r305737: bspatch: remove superfluous newlines from errx strings

r305822: bspatch: use #define for header size instead of magic number

r306026: bspatch: Remove backwards-compatibility sys/capability.h support

bspatch previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may
see this file incorporated into other third-party software.

The Capsicum header is now installed as sys/capsicum.h in stable/10 and
FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic.

With this change, bspatch is identical between head, stable/11 and releng/11.0.

=== portsnap ===

MFS r305648 (delphij): MFC r305469:

Ensure that we always open only files that is named by explicitly
using shell redirections instead of having gzip(1) to decide what
file to open.

Issue reported in the "non-cryptanalytic attacks against freebsd
update components" anonymous gist.

=== libarchive ===

MFS r305754 (mm): MFC r305422:

Sync libarchive with vendor

Vendor issues fixed:
PR #777: Multiple bugfixes for setup_acls()

This includes a bugfix for a bug that caused ACLs not to be read properly
for files and directories inside subdirectories and as a result not being
stored or being incorrectly stored in tar archives.

MFS r306321 (mm): MFC r305819:

Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged.

Approved by:	re (gjb), so (glebius)
uqs pushed a commit that referenced this pull request Oct 4, 2016
Vendor issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
the "non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Vulnerability #2 has already been fixed in r304866
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Sep 17, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Sep 22, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Sep 22, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Sep 29, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Oct 6, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Oct 13, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
Virus-V pushed a commit to Virus-V/freebsd-src that referenced this pull request Oct 15, 2023
This reverts commit 64e62bdf04ab8529f45ed0a85122c703035dec3a.

This commit ends up causing some lockdep splats due to trying to grab the
payload lock while holding the mgr's lock:

[   54.010099]
[   54.011765] ======================================================
[   54.018670] WARNING: possible circular locking dependency detected
[   54.025577] 5.5.0-rc6-02274-g77381c23ee63 freebsd#47 Not tainted
[   54.031610] ------------------------------------------------------
[   54.038516] kworker/1:6/1040 is trying to acquire lock:
[   54.044354] ffff888272af3228 (&mgr->payload_lock){+.+.}, at:
drm_dp_mst_topology_mgr_set_mst+0x218/0x2e4
[   54.054957]
[   54.054957] but task is already holding lock:
[   54.061473] ffff888272af3060 (&mgr->lock){+.+.}, at:
drm_dp_mst_topology_mgr_set_mst+0x3c/0x2e4
[   54.071193]
[   54.071193] which lock already depends on the new lock.
[   54.071193]
[   54.080334]
[   54.080334] the existing dependency chain (in reverse order) is:
[   54.088697]
[   54.088697] -> freebsd#1 (&mgr->lock){+.+.}:
[   54.094440]        __mutex_lock+0xc3/0x498
[   54.099015]        drm_dp_mst_topology_get_port_validated+0x25/0x80
[   54.106018]        drm_dp_update_payload_part1+0xa2/0x2e2
[   54.112051]        intel_mst_pre_enable_dp+0x144/0x18f
[   54.117791]        intel_encoders_pre_enable+0x63/0x70
[   54.123532]        hsw_crtc_enable+0xa1/0x722
[   54.128396]        intel_update_crtc+0x50/0x194
[   54.133455]        skl_commit_modeset_enables+0x40c/0x540
[   54.139485]        intel_atomic_commit_tail+0x5f7/0x130d
[   54.145418]        intel_atomic_commit+0x2c8/0x2d8
[   54.150770]        drm_atomic_helper_set_config+0x5a/0x70
[   54.156801]        drm_mode_setcrtc+0x2ab/0x833
[   54.161862]        drm_ioctl+0x2e5/0x424
[   54.166242]        vfs_ioctl+0x21/0x2f
[   54.170426]        do_vfs_ioctl+0x5fb/0x61e
[   54.175096]        ksys_ioctl+0x55/0x75
[   54.179377]        __x64_sys_ioctl+0x1a/0x1e
[   54.184146]        do_syscall_64+0x5c/0x6d
[   54.188721]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
[   54.194946]
[   54.194946] -> #0 (&mgr->payload_lock){+.+.}:
[   54.201463]
[   54.201463] other info that might help us debug this:
[   54.201463]
[   54.210410]  Possible unsafe locking scenario:
[   54.210410]
[   54.217025]        CPU0                    CPU1
[   54.222082]        ----                    ----
[   54.227138]   lock(&mgr->lock);
[   54.230643]                                lock(&mgr->payload_lock);
[   54.237742]                                lock(&mgr->lock);
[   54.244062]   lock(&mgr->payload_lock);
[   54.248346]
[   54.248346]  *** DEADLOCK ***
[   54.248346]
[   54.254959] 7 locks held by kworker/1:6/1040:
[   54.259822]  #0: ffff888275c4f528 ((wq_completion)events){+.+.},
at: worker_thread+0x455/0x6e2
[   54.269451]  freebsd#1: ffffc9000119beb0
((work_completion)(&(&dev_priv->hotplug.hotplug_work)->work)){+.+.},
at: worker_thread+0x455/0x6e2
[   54.282768]  freebsd#2: ffff888272a403f0 (&dev->mode_config.mutex){+.+.},
at: i915_hotplug_work_func+0x4b/0x2be
[   54.293368]  freebsd#3: ffffffff824fc6c0 (drm_connector_list_iter){.+.+},
at: i915_hotplug_work_func+0x17e/0x2be
[   54.304061]  freebsd#4: ffffc9000119bc58 (crtc_ww_class_acquire){+.+.},
at: drm_helper_probe_detect_ctx+0x40/0xfd
[   54.314855]  freebsd#5: ffff888272a40470 (crtc_ww_class_mutex){+.+.}, at:
drm_modeset_lock+0x74/0xe2
[   54.324385]  freebsd#6: ffff888272af3060 (&mgr->lock){+.+.}, at:
drm_dp_mst_topology_mgr_set_mst+0x3c/0x2e4
[   54.334597]
[   54.334597] stack backtrace:
[   54.339464] CPU: 1 PID: 1040 Comm: kworker/1:6 Not tainted
5.5.0-rc6-02274-g77381c23ee63 freebsd#47
[   54.348893] Hardware name: Google Fizz/Fizz, BIOS
Google_Fizz.10139.39.0 01/04/2018
[   54.357451] Workqueue: events i915_hotplug_work_func
[   54.362995] Call Trace:
[   54.365724]  dump_stack+0x71/0x9c
[   54.369427]  check_noncircular+0x91/0xbc
[   54.373809]  ? __lock_acquire+0xc9e/0xf66
[   54.378286]  ? __lock_acquire+0xc9e/0xf66
[   54.382763]  ? lock_acquire+0x175/0x1ac
[   54.387048]  ? drm_dp_mst_topology_mgr_set_mst+0x218/0x2e4
[   54.393177]  ? __mutex_lock+0xc3/0x498
[   54.397362]  ? drm_dp_mst_topology_mgr_set_mst+0x218/0x2e4
[   54.403492]  ? drm_dp_mst_topology_mgr_set_mst+0x218/0x2e4
[   54.409620]  ? drm_dp_dpcd_access+0xd9/0x101
[   54.414390]  ? drm_dp_mst_topology_mgr_set_mst+0x218/0x2e4
[   54.420517]  ? drm_dp_mst_topology_mgr_set_mst+0x218/0x2e4
[   54.426645]  ? intel_digital_port_connected+0x34d/0x35c
[   54.432482]  ? intel_dp_detect+0x227/0x44e
[   54.437056]  ? ww_mutex_lock+0x49/0x9a
[   54.441242]  ? drm_helper_probe_detect_ctx+0x75/0xfd
[   54.446789]  ? intel_encoder_hotplug+0x4b/0x97
[   54.451752]  ? intel_ddi_hotplug+0x61/0x2e0
[   54.456423]  ? mark_held_locks+0x53/0x68
[   54.460803]  ? _raw_spin_unlock_irqrestore+0x3a/0x51
[   54.466347]  ? lockdep_hardirqs_on+0x187/0x1a4
[   54.471310]  ? drm_connector_list_iter_next+0x89/0x9a
[   54.476953]  ? i915_hotplug_work_func+0x206/0x2be
[   54.482208]  ? worker_thread+0x4d5/0x6e2
[   54.486587]  ? worker_thread+0x455/0x6e2
[   54.490966]  ? queue_work_on+0x64/0x64
[   54.495151]  ? kthread+0x1e9/0x1f1
[   54.498946]  ? queue_work_on+0x64/0x64
[   54.503130]  ? kthread_unpark+0x5e/0x5e
[   54.507413]  ? ret_from_fork+0x3a/0x50

The proper fix for this is probably cleanup the VCPI allocations when we're
enabling the topology, or on the first payload allocation. For now though,
let's just revert.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 64e62bdf04ab ("drm/dp_mst: Remove VCPI while disabling topology mgr")
Cc: Sean Paul <sean@poorly.run>
Cc: Wayne Lin <Wayne.Lin@amd.com>
Reviewed-by: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20200117205149.97262-1-lyude@redhat.com
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Oct 20, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Oct 27, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Nov 3, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Nov 10, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Nov 17, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Nov 17, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Dec 30, 2023
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Jan 6, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Jan 14, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Jan 19, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Jan 26, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Feb 2, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Feb 9, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Feb 9, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Feb 16, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Feb 16, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Feb 23, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Mar 1, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Mar 8, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
bnovkov pushed a commit to bnovkov/freebsd-src that referenced this pull request Mar 14, 2024
hwt: more misc fixes + updates to support SPE backend
yasuhirokimura pushed a commit to yasuhirokimura/freebsd-src that referenced this pull request Mar 15, 2024
After devel/boost-libs is updated to 1.81.0, build fails on -CURRENT
because of clang's assertion failure as following.

clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o

  "c++" -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I"."   -o "bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o" "libs/url/src/src.cpp"

Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Casting.h, line 579.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -x c++ -fvisibility-inlines-hidden -m64 -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -std=gnu++17 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DBOOST_ALL_NO_LIB=1 -DBOOST_URL_SOURCE -DBOOST_URL_STATIC_LINK=1 -DNDEBUG -I. -o bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o libs/url/src/src.cpp
1.	./boost/url/impl/segments_view.ipp:33:1: current parser token '{'
2.	./boost/url/impl/segments_view.ipp:17:1: parsing namespace 'boost'
3.	./boost/url/impl/segments_view.ipp:18:1: parsing namespace 'boost::urls'
 #0 0x00000000058158c1 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:13
 freebsd#1 0x0000000005813c45 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:105:18
 freebsd#2 0x00000000057bb7cb HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 freebsd#3 0x00000000057bb7cb CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
 freebsd#4 0x000000082a4a9a8f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
 freebsd#5 0x000000082a4a904b thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:247:1
 freebsd#6 0x000000082802a2d3 ([vdso]+0x2d3)
 freebsd#7 0x000000082e2a3cda thr_kill /usr/obj/usr/src/amd64.amd64/lib/libc/thr_kill.S:4:0
 freebsd#8 0x000000082e21d1f4 raise /usr/src/lib/libc/gen/raise.c:0:10
 freebsd#9 0x000000082e2cd3b9 abort /usr/src/lib/libc/stdlib/abort.c:73:17
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/src-00f4ba.cpp
c++: note: diagnostic msg: /tmp/src-00f4ba.sh
c++: note: diagnostic msg:

********************
...failed clang-linux.compile.c++ bin.v2/libs/url/build/clang-linux-16/release/link-static/pch-off/threading-multi/visibility-hidden/src.o...

So add upstream patch to fix it.

PR:		269067
Obtained from:	https://reviews.llvm.org/D148474
kevans91 pushed a commit to kevans91/freebsd that referenced this pull request Mar 31, 2024
kevans91 pushed a commit to kevans91/freebsd that referenced this pull request Jun 10, 2024
(cherry picked from commit 3607c6a7e7f79a7cb89b79ccadc74d97fe6cefce)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants