This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Reproduction case for use-after-free crash in auto_manage_torrents. | |
| The bug: after remove_torrent() is called (which calls abort() and unlinks | |
| the torrent from all session lists), a previously-dispatched torrent_handle | |
| operation (like set_flags with auto_managed) can re-add the torrent to | |
| m_torrent_lists. Since the torrent is no longer in m_torrents (the owning | |
| container), once the last shared_ptr is dropped the torrent is destroyed, | |
| leaving a dangling pointer in m_torrent_lists. The next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * MIT License | |
| * | |
| * Copyright (c) 2022 Albert Chang | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |