Commit 0dd171d
Handling FaissException in few destructors of ResultHandler.h (facebookresearch#3311)
Summary:
Pull Request resolved: facebookresearch#3311
**Context**
[Issue 2948](facebookresearch#2948) highlights potential issue of calling allocation on result handler which may throw exception but it is not handled.
**In this diff**,
I observed two calls where we may potentially call allocation in ResultHandler.h and handled FaissException.
1/ partial result when finalized in ~SingleResultHandler
2/ partial result when merged in ~RangeSearchBlockResultHandler
Reviewed By: junjieqi
Differential Revision: D55258213
fbshipit-source-id: 259be472e73619b2fcb0ea480d6d3486affeafdf1 parent 3f13bab commit 0dd171d
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
504 | 506 | | |
505 | 507 | | |
506 | 508 | | |
507 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
508 | 518 | | |
509 | 519 | | |
510 | 520 | | |
| |||
559 | 569 | | |
560 | 570 | | |
561 | 571 | | |
562 | | - | |
563 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
564 | 581 | | |
565 | 582 | | |
566 | 583 | | |
| |||
0 commit comments