sudheerv commented on issue #6850:
URL: https://github.com/apache/trafficserver/issues/6850#issuecomment-638970068


   Dug in a bit more and I think I understand the reason why the assert never 
fired in our non-ats9 version.
   
   It looks like the `HostDBInfo` is 8 bytes larger in ats9 (compared to ats6 
version) and that (when multiplied by number of RR records) pushes the alloc 
size over the 32K boundary. We were just lucky to not hit the assert in ats6.
   
   Comparing what is contributing to the increase though, I don't see any 
differences in the actual fields in `HostDBInfo` between the two versions, 
however, there does seem to be some rearrangement of field (specifically, 
`iobuffer_index` has been moved towards the end of the struct definition as 
opposed to being at the top in ats6 version). This likely would have disturbed 
the struct alignment and likely added 8 bytes to the size of the struct.
   
   In the ats9 version
   ```
   (gdb) p sizeof(HostDBRoundRobin)
   $1 = 24
   (gdb) p sizeof(HostDBInfo)
   $2 = 96
   ```
   
   In the ats6 version
   
   ```
   1347 HostDB.cc: No such file or directory.
   (gdb) p sizeof(HostDBInfo)
   $1 = 88
   (gdb) p sizeof(HostDBRoundRobin)
   $2 = 24
   (gdb) l HostDBInfo
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to