You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bneradt (via GitHub)" <gi...@apache.org> on 2025/04/04 16:21:50 UTC
[PR] GCC 15: Address mismatched-new-delete in MemArena::Block [trafficserver]
bneradt opened a new pull request, #12163:
URL: https://github.com/apache/trafficserver/pull/12163
This addresses a GCC 15 compiler warning about mismatched std operator new and overridden operator delete in MemArena. This patch addresses the warning by also overriding operator new for the MemArena::Block.
This is the warning being addressed:
```
lib/swoc/src/MemArena.cc: In member function ‘swoc::_1_5_14::MemArena::Block* swoc::_1_5_14::MemArena::make_block(size_t)’:
lib/swoc/src/MemArena.cc:99:44: error: ‘static void swoc::_1_5_14::MemArena::Block::operator delete(void*, void*)’ called on pointer returned from a mismatched allocation function [-Werror=mism
atched-new-delete]
99 | return new (::malloc(n)) Block(free_space);
| ^
src/ts_asf_master_fix_builds_for_fedora_42/lib/swoc/src/MemArena.cc:99:23: note: returned from ‘void* malloc(size_t)’
99 | return new (::malloc(n)) Block(free_space);
| ~~~~~~~~^~~
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GCC 15: Address mismatched-new-delete in MemArena::Block [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #12163:
URL: https://github.com/apache/trafficserver/pull/12163#issuecomment-2779277973
Interesting:
```
Fatal glibc error: malloc.c:2599 (sysmalloc): assertion failed: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GCC 15: Address mismatched-new-delete in MemArena::Block [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt merged PR #12163:
URL: https://github.com/apache/trafficserver/pull/12163
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GCC 15: Address mismatched-new-delete in MemArena::Block [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #12163:
URL: https://github.com/apache/trafficserver/pull/12163#issuecomment-2786622545
Cherry-picked to 10.1.x branch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GCC 15: Address mismatched-new-delete in MemArena::Block [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #12163:
URL: https://github.com/apache/trafficserver/pull/12163#issuecomment-2977876809
Cherry-picked to v10.0.x
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GCC 15: Address mismatched-new-delete in MemArena::Block [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #12163:
URL: https://github.com/apache/trafficserver/pull/12163#issuecomment-2779238430
[approve ci]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org